Python 2.6 support.

Lots of little fixes, especially changing {} to {0} in format strings,
but also monkeypatching unittest2 in.