Moves some javascript utility functions into a single util.js
file. We don't want more files than strictly necessary.
Fixes Convert javascript class. It now properly converts
block coordinates to pixel offsets and vice versa.