Start of transaction interceptor for 2.0->2.1 rolling upgrade

o Refactorings for injection of interceptor
o Start of the interceptor and a decent test setup for it
Merge branch 'master' into 2.1-rolling-upgrade
Merge branch 'master' into 2.1-rolling-upgrade
Adds basic tests for slave transaction rewriting, disabled
First wave of refactorings disentangling Commands from operations on them

This is the first in a series of commits refactoring how commands are
 read, written and executed and how transactions are deserialized and
 rewritten. The immediate usability of this is rolling upgrades. However,
 this is not complete, still lacking proper method names in places and some
 wires hanging out. Must be polished before merging.

Neo store Commands no longer carry the responsibility of reading, writing and
 executing themselves. Instead, this is now moved to XaCommandReader, XaCommandWriter
 and XaCommandExecutor classes which can implement whichever way is necessary to go
 about their task. Currently there is only one, which is what the Command
 subclasses did on their own.
Commands no longer need to be created in each usage, although they currently are. An
 init() call can bind it to a proper context, allowing future pooling of Command objects,
 or even having just a single one passed around.
XaLogicalLog now requires and uses factories for the command reader and command writer
 to use, since eventually that will be provided from the outside so rolling upgrades
 can work. The factory is necessary since the LogExtractor must use a separate
 scratch buffer.
Transaction reading and writing from XaLogicalLog now happens through a LogReader/LogWriter
 pair which can accept different handlers, abstracting operations in a way that allows
 for random rewriting of incoming or outgoing transactions. This way, master and slave
 operations are practically the same except that they set a different handler in each case.
Merge branch 'master' into 2.1-rolling-upgrade

Conflicts:
	community/kernel/src/test/java/org/neo4j/test/LogTestUtils.java
Introduces log entry reading/writing versioning and a Cursor abstraction

Removed LogIoUtils, instead having separate classes that do the reading
 and writing of log entries. The reason is that we need to have versioned
 log entries to enable rolling upgrades when the log format changes.
Logical log reading and iteration over entries happens in its own class,
 LogDeserializer. This class will be responsible for recognizing
 log entry versions and use the appropriate reader.
LogReader now returns a Cursor that accepts a Consumer. This pattern
 allows for controlling the flow of log entries from the caller
 while leaving the responsibility of the iteration with the
 LogReader. This change causes ripples all over the code base since we
 did all iteration by hand by using static methods in LogIoUtils.
LogEntry instances now have a type field which allows for switching
 on them instead of instanceof checks.
LogExtractor now also exposes a Cursor over an extracted transaction
Merge branch 'master' into 2.1-rolling-upgrade

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/xa/TransactionWriter.java
	enterprise/consistency-check/src/test/java/org/neo4j/consistency/checking/GraphStoreFixture.java
Another round of refactorings, to allow for versioned command reading

LogDeserializers delegate the version read to the VersionAwareLogEntryReader
LogEntries carry a version field
LogDeserializers no longer require a CommandReader - they require a
 CommandReaderFactory that knows about versions
CommandReaderFactory must now know about versions
LuceneXaCommandFactory no longer depends on LuceneDataSource
Merge branch 'master' into 2.1-rolling-upgrade

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/xa/Command.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/xa/NeoStoreTransaction.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/xa/NeoStoreXaDataSource.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/LogExtractor.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/LogIoUtils.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/PartialTransactionCopier.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/XaLogicalLog.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/util/DumpLogicalLog.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/index/TestIndexCommand.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/xa/LogTruncationTest.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/xa/NeoStoreTransactionTest.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/TestXaFramework.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/LogMatchers.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/TestLogPruneStrategy.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/TestPartialTransactionCopier.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/TestTxTimestamps.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/XaLogicalLogTest.java
	community/kernel/src/test/java/org/neo4j/test/LogTestUtils.java
	community/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneDataSource.java
	enterprise/backup/src/main/java/org/neo4j/backup/BackupService.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/statemachine/StateTransitionLogger.java
First set of changes needed to rewrite entries on the fly

Introduces Command reader for previous version commands
CommandReaderFactory is aware of entry version and returns the appropriate
 command reader. Currently not pooled but should be.
LogEntryConsumer is now aware of entry versions and keeps them
 around if they are of previous versions, so it can translate them.
The DenseNodeTransactionInterceptor now works for adding and removing
 relationships. There is still work to do, but all changes but
 adding/removing properties and labels should work.
Merge branch 'master' into 2.1-rolling-upgrade
LogEntry translation now also respects Property changes

Introduces RecordChanges.setTo so that whole record entries can be set,
 avoiding the need to go over each field for incoming records
Moves away from instanceof checks in DenseNodeTransactionInterceptor and
 instead uses a visitor for the same purpose
RelationshipGroups are no longer kept around when empty. Updates
 tests to reflect that.
Fixed Cypher tests that depended on list order, when set is enough
Renamed and refactored DenseNodeTransactionTranslator
Created Lucene translator that just upgrades the version number
Wired in the translators
Added message explaining backup has been archived.
Fix bugs in PersistenceWindowPool

- Make it resilient against very small store size and memory size
  configurations.
- Make `allocateNewWindow` give up if it cannot map a BrickElement reasonably
  quickly.
This improves the internal iteration by up to a factor of 5.

It's still a bit slow, though.
Small cleanup
Bumping to 1.9.8
Rewrite var length relationship properties correctly in the where clause