[qmf] Fix unscoped SQL query causing transaction failures

This query wasn't scoped and never called finish(), so it was still active during the rest of the store initialization. Attempting to commit any transaction would then fail due to the active query with some versions of sqlite.