Fix a bug in canvas entity implementation when flipped and rotated

Currently, the canvas context was saved separately for flipped and rotated entities, but restored only once.  This totally messes with canvas rendering!

This patch fixes this by only saving the context once if called for.  (I also added a couple of comments to the code.)

Unfortunately, we can't have canvas-specific tests in our test suite as currently implemented.
Merge pull request #839 from starwed/context-fix

Fix a bug in canvas entity implementation when flipped and rotated