Move tests out of momoko module.

This makes it possible to run the tests without importing
one of the Psycopg2 implementations first.