Locking service for use in IndexingService.

Populating the indexes requires reading from the store files. That needs
to be synchronized such that applying transactions does not conflict
with the index populator reading the state of the store, since the store
might be in in inconsistent state while the transaction is being
applied. This locking service is simple and efficient, and will avoid
issues with interfering with the standard locking system, as re-using
the LockManager would have done.

Really, this is intended for a lower level of locks, where the existing
LockManager locks entities on a logical level, and distributed across a
cluster, this LockService locks entities on a record level, and only
locally on the same instance, never across instances in a cluster.

This locking API also included LockGroup, which can be used to group
multiple locks in a scoped region for releasing all at once at the end
of that region.