More CheatyVision dev

Implemented Encode.java to mirror encode.py used on the tablet side.  Still should test this to make sure it does everything thing right in edge cases.  Ideally has identical behavior to python module, and ideally they both have correct behavior.

Also reorganized several of our auxiliary classes into the tools package, so things are not so cluttered.