Rotary encoder code.

The cheap rotary encoders are pretty noisy, so they aren't particularly reliable for exact clicks back and forth. But, they are decent enough for menu selection.