Synchronized some changes in OpenGL1 with OpenGL3; fixed tile background error.

The changes that were synchronized were generally the ones mentioned
as part of issue #168. The changes have been tested to work with tiles
and with 3D drawing for OpenGL{1,3}.

The fixed tile background error is the one causing issue #207.
The cause was that when a tile's background in the LateralGM
editor is deleted, the tile is not removed. When the game is
later written to ENIGMA as part of compiling, the tile gets
a background id of -1. Since the tile drawing functions always
assumed a valid background id, this cause crashing errors.

The fix was chosen to be to always check whether the
background exists before drawing the tile.

Closes #168.
Fixes #207.