Python auto close

Using a closed {Cursor,Session,Connection} handles in Python will not crash the VM.  Ref #485.