[wip] checking for allocation failures etc.

- in some places, check malloc return values
- in other cases, just make it crash "properly" if malloc fails
  (we even get nice location info)
- possibly offending functions that were (mostly) checked:
  - malloc
  - calloc
  - realloc
  - ass_aligned_malloc
  - strdup
- also add some macros and functions intended to deal with possible
  integer overflows
- some changes are library-user-visible, like returning NULL or -1 on
  allocation failures (instead of crashing hard)
- not checked: freetype/harfbuzz/fontconfig calls
- almost completely untested