Wrap pyodbc resource connection cursors in a cursor context to ensure that they are closed