Screen/Custom/RasterCanvas: new software renderer

Grayscale rendering with SDL_gfx is extremely slow, because SDL
assumes a palette at 8 bits per pixel.  This SDL_gfx fork circumvents
this problem.
Screen/Custom: add Dither class to support 1bit rendering

Code adapted from imx.60 linux kernel EPD driver by Daiyu Ko <dko@freescale.com>
Screen/Custom/Dither: remove Atkinson dithering

Atkinson's dither doesn't render XCSoar as well as Sierra-Lite, is slower and requires
a larger temporary buffer.
Screen/Custom/Dither: use typedef for error buffer

This change allows the fastest type to be used for the error distribution
buffer.  Not sure what the best type should be for this.

Also includes minor optimisation to diffusion pointers (can explicitly avoid multiplication).
Screen/Dither: pass "const" source pointer
Makefile: add option "DITHER"
Compiler.h: add macro CLANG_VERSION
Util/TypeTraits: use std::is_trivially_destructible with clang 3.3

Fixes build failure with clang 3.3 and glibcxx 4.8.
Makefile: enable glibcxx debugging on DEBUG=y mode
Merge branch 'v6.6.x'
SDL/TopCanvas: don't cast uint8_t* to bigger alignment

Fixes gcc 4.8 alignment warnings.
SDL/Canvas: obey offset in greyscale Copy()

Fixes the fly/sim chooser.
SDL/Canvas: add missing "return" in greyscale Copy()
Makefile: fix flipped DEBUG check for glibcxx debugging

Regression from commit a83c42a5.
Airspaces: fix iterator after erase()

Bug found by _GLIBCXX_DEBUG.
AbortTask: fix iterator after erase()

Bug found by _GLIBCXX_DEBUG.
SearchPointVector: don't dereference end()

This is not legal, and our code was a dirty hack which aborts with
_GLIBCXX_DEBUG.  Instead of dereferencing end(), we now pass the real
iterator to PolygonInterior().  This adds another header dependency.
OrderedTask: add missing range check in Remove()

Don't update an undefined task point when deleting the last one.  This
fixes a potential crash in the task editor.
Merge branch 'v6.6.x'
SDL/Canvas: don't convert surface if already the right format