objectcache: optimize lock() and unlock() methods in SqlBagOStuff