3D Hydrazone-Functionalized Covalent Organic Frameworks as pH-Triggered Rotary Switches.