Fixed several errors in date/time parsing

Because of a missing attribute in the extensions module several tests were not run. Running them has exposed a lot of issues in adaptation/typecasting of date/time objects. This branch should fix everything.

Reported in mvantellingen/psycopg2-ctypes#30