[qtcontacts-sqlite] Explicitly finish queries in non-automatic storage

Failure to finish queries leads to the SQLITE_LOCKED error.
Merge pull request #1 from matthewvogt/query-finish

[qtcontacts-sqlite] Explicitly finish queries in non-automatic storage