Optimize tagging by performing bulk insert

Also:
* Protect quick_autoreview with a lockfile
* Fix typo which would have failed to increment batch offset

Change-Id: I10a9c27bc28c11a064e00ed3c7b4b42bdb994b7e
Merge "Optimize tagging by performing bulk insert"