Extract the ttf font (with glyph cache) and the bitmap font into classes.

Made one global static instance of each of them (for now).
They have a common base class (Font), with a single virtual function: OutputChar (which used to be the function pointer to the actual output function).
There is a global pointer to one of these two instances. This pointer is used instead of the global function pointer to call the virtual function.
During initialization one of the two Font objects (bitmap/ttf) is initialized and the font pointer is set to point to that object.
Prevent double drawing ("native" and cata_tiles)
Replace halfheight / halfwidth with inline calculation
combine both versions of curses_drawwindow

Both version differed in some formatting (non-functional), and the usage of tilecontext.
Extract some code into a more convenient function.

Also: a lot less indenting
Put the tilewidth into BitmapFont class.
make draw_ascii_lines a function of Font class.
Make a Font::draw_window function, which contains most of curses_drawwindow

The reason for this is to allow different fonts to be used for different windows.
Now the drawing code is connected to the font (the this object).
Slightly reformat curses_drawwindow, no functional changes
Give the Font class their own fontwidth and fontheight settings.

Currently they are the same as the global ones.
Make a function that loads bitmap and truetype fonts.

It returns either a BitmapFont or a CachedTTFFont object. Or NULL if loading failed.
Add a second font for the map terrain.

Font data is now loaded from a data/fontadata.json. Entries there override entries from the original data file.
It allows a normal font and a font used to display the w_terrain window in the game.
Make terrain window size correct.

Added two functions map_font_width/map_font_height that return the font dimensions of the terrain window.
There might be three different dimensions: the standard font (use for everything), The tiles coming from cata_tiles. The terrain window specific font.

The initialization of the terrain window in game::init_ui has been a bit simplified.

input_context::get_coordinates had to be adjusted to calculate the coordinates of the terrain window correctly with different font sizes.
Hack to make make the hit animation work with map font.

Store the animation hit window in a global variable, when drawing check for it and apply a special offset (based on the size of the map font, not the normal font).
sdltiles: rework glyph cache.

Create a cached glyph texture that has exactly the size of a square (fontwidth * fontheight).
Remove the ttf y-offset hack.
Move the player character back into the center of the terrain window.
Use the tiles from the bitmap font to draw walls and similar.
Correctly create glyph textures.

Glyph is not stretched anymore, just copied to the texture.
All function have proper error reporting.
Add dynamic glyph cache.

Store glyphs that were generated during runtime in a map.
Merge ability to load seperate fonts for map and menus in SDL mode.