Cleanup object URLs in gfx.js

Fix for issue #694.
- Always convert images to canvases
- Cleanup object URL after conversion