Replace lock with NDB transactions

Fix https://github.com/GoogleChrome/webrtc/issues/292