Add a dependency on six.

six provides useful porting facilities for Python 3 + 2.x support in a
single source tree.
Python3: fix TypeError comparing None with int.
Fix reraising exceptions on Python3.
Skip __pycache__ when iterating commands.
Cope with ConfigParser moving on Python3.
On Python3 map returns a generator not list.
Switch to using dbm rather than anydbm.

With the removal of hashdb in Python3 the anydbm module ends up creating
databases in Python2.7 that are incompatible with Python3. By using dbm
specifically we avoid this problem.
Coerce db values to unicode.

The DB interface returns bytes and accepts bytes, but we're dealing
with strings. On Python2 this doesn't matter, but for 3 the difference
is significant.
Handle having tests run in an LXC container.

LXC containers have a localhost sshd key different to their host, but
may have a user homedir bind mounted in. When that is done, ssh
localhost will error due to a mismatched host key. By using the
container ip address we can avoid this problem.
Provide a bytestring for fake package content.

Required for Python3 compatibility.
Handle different line endings from ssh.

Not sure why, but when running under testtools directly vs testr we
see \r\n as the line ending from the ssh subprocess. We need to
support both test environments, so permit either.
Cope with randomized set sort order on Python3.

The cache returns a set which has no guaranteed ordering, but tests
were abusing the deterministic behaviour of Python2.7.
Use io.StringIO for Python3 compat.

This requires changing the sample configs we use to be Unicode strings
too.
Use io.StringIO for Python3 compatibility.
Treat stdin/out/err as StringStreams.

Under Python3 stdin/out/err emit and consume strings, not bytestrings.