[PATCH 2/3] services: Add proper handle management to LockServiceDatabase() and UnlockServiceDatabase().