More gfx tests

This adds three failing tests and fixes one of them (by taking x, y, width, height into account in contextToRgbData).
Aside: I'm starting to grow concerned about the various array copies here in gfx.js and in DirectUtils.java. But we can't optimize easily until we achieve correctness, so they're right for now.