WIP: Major refactor of javascript

This is a massive refactor of the client code, splitting most of it out into modules so that everything is not running rampant in the global namespace.

I'm still iterating on it.

http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html


Features picked up along the way in anticipation of others:
- Press space to pause and restart
- Jump to viewing a particular frame with `mapView.showTimeStep()`
- Define a global integer `showFPS` to output a FPS measurement every `showFPS` frames.
- Better caching of lines (with barbs) and API calls