Minor DatabaseWrapper refactoring and cursor bugfix

A brief refactoring to better support Django 1.6+ changes to the DatabaseWrapper API (eg: ``init_connection_state``, ``create_cursor``). As well, the second commit fixes a bug that I believe was only noticed in 1.7 (see #52 about the exception raised regarding closed cursors).

The DatabaseWrapper could still use some more love it looks like, but I a bit strapped for time at the moment and really just needed to get this package working at a baseline level in 1.7. I'll definitely devote some more time to it if I get the chance.