[qtcontacts-sqlite] Ensure queries are completed