Explicitly close cursors in createcachetable command
Explicitly close cursors in spatialite backend
Ensure schema and migrations code explicitly closes cursors.
Explicitly closing more cursors in various tests.