Observation of binding and rotation of methane and hydrogen within a functional metal–organic framework