Tuning microcavities in thermally rearranged polymer membranes for CO2 capture.