Porosity and molecular rotor dynamics in covalent frameworks and supramolecular architecture