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

Failure to finish queries leads to the SQLITE_LOCKED error.