Clean up and improve GL image uploading code.

Upload original and scaled versions of image at different mipmap levels
when ‘gl_upscale_pcx’ is enabled. Enable mipmapping for upscaled images.

Bump minimum required OpenGL version to 1.2 and remove some feature
checks.

Get rid of small is_foo() functions and ‘upload_image’ hack, simply pass
image type and flags as arguments to GL_Upload*. Set all texture object
parameters in a separate function.