Some gfx fixes and tests

All the tests have been validated on a real Nokia Asha 503
Aside: these converter functions get redefined every time *getPixels* is called. Ditto for the one in *drawPixels* below. We should move them to the outer function and merely reference them here.

But also, these converter functions get called a crapton, once for every pixel of the image. SpiderMonkey's JIT compiler may handle this, but I wonder if we'd get a perf win out of inlining their code into the handful of possible variants of *rgbDataToContext* and *contextToRgbData*, so we don't pay the cost of the function calls.