Remove current tests
Import unittests from psycopg2

These are the modified tests (dde7c49bfb9d628face50c1a6821c50895b594ee)
Update unittests to work with psycopg2ct
Implement Connection.server_version and Connection.protocol_version
Reorder definitions, keep the order as in the manual.

Also add the following functions:
 - PQgetCancel
 - PQfreeCancel
 - PQcancel
 - PQrequestCancel
 - PQbackendPID
Implement get_backend_pid()
Implement Connection.cancel()
Add a few stubs so that the tests are able to run
Move import psycopg2 tests to own test dir
Revert to using the imported psycopg2 tests
Remove the DatetimeTests and mxDateTimeTests if the _psycopg2 module does not exist
Add the compat module
copy various constants from psycopg (isolation levels and connection status)
make isolation level readonly
Fix psycopg2 compat in tests so that they can be run directly
Import the various dbapi 2.0 types at module level
rename Cursor.setoutputsizes -> Cursor.setouputsize
Publish various exceptions via the Connection class
Use psycopg2.extensions.PYDATE instead of psycopg2._psycopg.PYDATE 

Also for PYTIME, PYDATETIME and PYINTERVAL. psycopg2.extensions imports these types from _psycopg. 

This change allows us to implement these in the ctypes version
Reorganize the module layout and move 'internal' stuff to _impl. 

The idea is that we only 'export' the modules in the psycopg2ct namespace which are also available in the psycopg2 library.

Also update the encodings (from Max Lavrenov)