Implementing preloading, and fixing layer shading

Layer shading is smarter now, instead of just darkening the whole tile
square, only non-transparent pixels will be shaded.

In order for this to work, I also implemented preloading, preventing the
game to do anything until it is finished loading and processing all
resources. Now anything that should be preloaded can be put into
Game.continueLoading(). When everything is finished, set loadstate to 1
and the game will start. In the future I intend to make loadstate the
percentage of loaded resources, and a loading progress bar too (despite
how fast it will finish...)
Fixing Image.loadFromCanvas()