[qtcontacts-sqlite] Close database on destruction.

Ensure that we close the databases to avoid leaking fds.