Simplify Desmond:mousepressed definition

Move the Desmond swing variables into the class. Slightly more memory usage but
better encapsulation.
Write a unit test for Desmond:mousepressed
Add state_test module

Also wrap a long line in state.lua