Fix UVs in plane and heightmaps plugins

Tested by examples/pages/flags/backfaceTexturing.html and
examples/pages/tests/heightmaps/colorMapHeightMap.html

Also fixes out-of-range image access in custom heightmap plugin.