Don't flush the cache if the device is lost
Handle the case when the TTF page fails to be created.

This can happen when the D3D device is lost, but some ttf function is called.
glGenerateMipmap needs to come after glTexImage2D

Plus post_generate_mipmap made no sense otherwise...
Emulate mouse pressure for backends that don't support pressure.

The emulated pressure is simply a readout of whether any buttons are pressed.
This allows for easier handling of pressure by the user (i.e. a dumb mouse will
act as a fully depressed stylus). This seems to be what other applications
(e.g. GIMP) do.
Document the pressure field in ALLEGRO_MOUSE_STATE and ALLEGRO_EVENT
Detab block
Don't clear the shaders from bitmaps upon device reset.

This shouldn't have been necessary for awhile now, since all the shaders are
properly reset/recreated via callbacks.
Change the way the Android backend clears the shaders
Don't store sub-bitmaps in display->bitmaps.

This is not necessary due to changes in the conversion code, and in fact wasn't
handled correctly by it.

The big deletion in d3d_bmp.cpp has been a no-op for awhile, due to how
get_extra() worked.
Remove al_destroy_display_bitmaps

This wasn't used for much, as the destructor system takes care of destroying
the bitmaps before the displays are destroyed. From what I can tell, this was
only called for sub-bitmaps. This commit changes this so that the sub-bitmaps
are registered in the usual destructor list.
Allow destroying sub-bitmaps even if the parent is already destroyed

This is neccessary, since the bitmap conversion code may put the parent
destructor after the destructors of the sub-bitmaps.
Make sub-bitmaps inherit the display field.

This is necessary because X11 and OSX backends migrate bitmaps between displays
while updating this field.

_al_get_bitmap_display is added to access the display field correctly, and the
field is renamed to _display to catch issues.
Fix warnings
Catch possible display loss while resetting the display.

May fix occasional crashes when resizing, toggling full-screen etc.
Cumulative changes of the changes made for Factorio version of allegro.

1) Optimisations of the drawing methods, mainly the d3d part, it makes the drawing of bitmaps 2 - 3 times faster.
Some of these need to be called in special circumstances, so these methods have _optimised suffix.
2) Fonts with borders (ALLEGRO_TTF_RENDER_BORDER)
3) Small fixes for primitives drawing
4) Fix of the bug, that some special kind of mouse didn't work on mac
5) some other very small other fixes.