Remove cyclic reference between Connection and Cursor

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.
Add a test for the cyclic reference leak issue, and fix tests so that they run on Python 3.2