Fixed use of Python object with refcount 0 in cursor_init

Caused segfault running test_cursor.CursorTests.test_invalid_name under
Python 3.4 built in debug mode.
Avoid printing the typecast name in debug statement

The way we were doing it is unsafe and causes assertion failures on Py3.

Fixes ticket #188