Add coloured logging to Python 3.2 and PyPy3

The root handler can simply be reassigned, even if `logging.basicConfig()`
doesn't support a `handlers` parameter.
Fix time.perf_counter() compatibility bug

Python3.2/PyPy3 do not support time.perf_counter(), so it is monkey-patched in
the `compat` module.