Some gfx fixes and tests

All the tests have been validated on a real Nokia Asha 503
Filed https://github.com/andreasgal/j2me.js/issues/675