Fix Connection/Cursor Object Leak

Keeping a reference to Connection.errorhandler inside of Cursor's __init__(),and creating
Connection._last_execute_cursor from within Cursor was creating a cyclic reference between Cursor
and Connection ultimately leaking both a Connection and a Cursor.

The commits herein fix this issue, add a test for it, and fix the tests so that they will run on Python 3.2.