Mesoporous structure and phase transition of nanocrystalline TiO2