Drop test database on connection teardown.
Add cursor tests and fix the problems they found.