A stepwise transition from microporosity to mesoporosity in metal–organic frameworks by thermal treatment