Many fixes and improvements to layer masking

– Fixed a bug which created an excessive number of masks when redrawing
layers
– Fixed a bug which prevented layer masks from being restored
–– To restore a layer mask, use the restoreCanvasOnRedraw() method
– Fixed a bug in which a layer could not be dragged if any masked
portion of another layer was above it
– Multiple layer masks now coexist more easily
– Rewrote the jCanvas transformation stack to be more stable and
effective
– Removed the deprecated drawGraph() method from the source