Refactors state machine contexts into interfaces

This commit is a needed refactoring to make state machines more testable.
 It removes all dependencies from all state machine contexts that before
 had them interconnected and all tangled up, requiring multiple levels
 of mocking. Instead, now they are all implemented by MultiPaxosContext
 which takes care to factor out common needed functionality. While the
 diff is large, it does not represent too big of a change.
Fixes Paxos instance reuse issue

It is possible for a Paxos instance to be started before a previous
 instance has been closed, and to use the same instance Id. A potential
 bug around this is that on receiving phase1Timeout for the second
 instance, the message will be dropped altogether and not retried, as
 the proposer state machine considers the instance closed.
 This commit fixes this issue and introduces a test case for it.
Fixes issue with instances properly changing to PENDING on losing quorum

Instances in TO_SLAVE or TO_MASTER state will remain forever in that state
 if quorum is lost and regained. This commit adds tests for this condition
 and removes an if statement that caused it.
Ensures that ProposerState unbooks retried instances
Unused imports
Make EphemeralFS able to dump snapshots as zip files.

In order to debug issues that occur with ImpermanentGraphDatabase, make
it possible to dump the contents of a EphemeralFileSystemAbstraction to
a zip file for analysis of the data.

This has been integrated in the CypherDoc generation, in order to get a
better view of issues, should they occur there.
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.
Integrate LockingService into IndexingService.

Use the LockingService to mutually exclude WriteTransaction and index
populators from the same nodes. This is done by having WriteTransaction
acquire locks for each node it updates, releasing them when transaction
application completes, and by having the store scanner that the indexes
use acquire a lock for each node that it reads, releasing it after it
has completed reading that node. This ensures that the node does not
change while the index populator reads it.

In order to introduce a clear lock region for when the index populator
reads a node, the NeoStoreIndexStoreView had to be refactored. It now
does node processing in two distinct steps:
1. reading - this is done under lock to ensure a consistent view of the
   node.
2. processing - this is done after the lock has been released, to allow
   the processing to be something complex, while minimizing the locked
   region.
Where NeoStoreIndexStoreView previously used the RecordStore.Processor
API, it now does the iteration itself to allow the lock to be lexically
scoped, making it much easier to reason about. Otherwise some mechanism
similar to the previous LabelsReference would have had to been used, and
LabelsReference was too complicated to follow even for its simple task,
it would have been even more complicated to use that pattern for locks.

While this change reduced the "reuse value" of RecordStore.Processor, it
also reduced the total size of NeoStoreIndexStoreView (slightly), which
should make it a valuable change in of its own.