Damage the cursor when the focus changes so it is redrawn correctly.

A regression.
Don't add damage if begin_ == end_.
Buffer cleanups.
Introduced CharSubArray.
Makefile: CFLAGS/LDFLAGS cleanups and corrections.
Misc XCB cleanups.
Move deduper methods from header to body.
Deduper cleanups.
Use C++11 array initialisation in utf8::Seq.
HLine doesn't need size, so make seqnum uint32_t.

Remove the overflow checks, they aren't needed now.