Stop using weakref for Cursor.connection