made changes asked in review

- Added docs to /topic/db/sql.txt and /releases/1.8.txt
- Moved changes to the general CursorWrapper and fixed the bug in the
  original implementation.
- Added more test.