New rotary encoder implementation, based on a state machine and lookup table. Rotary encoder still seems to take two steps per detent when turned quickly, but when turned slowly you can see that no steps are missed. This still needs to be fixed.

After:
    Program Memory Usage  : 28780 bytes   87,8 % Full
    Data Memory Usage   : 991 bytes   38,7 % Full
Before:
     Program Memory Usage  : 28962 bytes   88,4 % Full
    Data Memory Usage   : 1004 bytes   39,2 % Full