Fix part of #11: cursor without block or cur txn is error.
Fix part of #11: transactions track and close cursors.
Merge pull request #18 from vjoel/fix-issue-11

Fix issue 11