sqlite: Fix inverted unlock

We acquire the connection after acquiring the sqlite lock, so we need to
release those in reverse order, as it's done implicitly in the
Context destructor
9 jobs for !621 with fix_priority_accesses in 13 minutes (queued for 3 seconds)
latest merge request