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.