Tidied up and optimised Sprite prototype

Moved all functions from being defined on the object to the prototype to
reduce the footprint when the sprite count gets high.

Removed JSLint formatting due to the requirement to move all var
declarations to the top of the scope and instead switched to JSHint.