Added buffering by proxy

All drawing is now done via the engine which will draw to the back
buffer by proxy and flip at the end of each game loop.
Rendering optimisations

Removed all instances of putImageData by creating images from the
buffers that can then be later used to call the drawImage method
instead, as this method has proven in benchmarks to be up to 93% faster.
See http://jsperf.com/canvas-drawimage-vs-putimagedata/3 for benchmarks.
Merge pull request #1 from rastating/enhancement/back-buffer

Branch merge