Merge pull request #1970 from digitalstain/1.9-maint

Adds INSTANCE_ID header in all outgoing messages. HIAAProcessor uses that
allSeesAllAsAvailable now has allSeesAllAsJoined as precondition
Added test for starting up single instance cluster
Adding tests around the backup tool.

o Tests covering the following:
  o Copying of files from store -> backup
  o Transactions that happen during copy are replayed
    onto the backup store
  o A transaction log contianing the latest transaction
    for lucene & neostore is in the backup
Merge pull request #1928 from mneedham/1.9-main-testing-backup

Adding tests around the backup tool.
Added better error message for offset error.
Merge pull request #2054 from jakewins/1.9-offseterr

Added better error message for offset error.
Classic StringLogger have option to log debug messages
Fixed a test shutdown issue
Throttles cluster transition logging.
More information in the case of an invalid offset
Merge pull request #2053 from jakewins/1.9-transitionthrottle

Throttles cluster transition logging.
Fix a bug where store migration forgets about legacy indexes.

IndexManager now also respects the availability guard (by virtue of transaction begin) when creating an index.
Only migrate legacy index.db store files if they exist.
Merge pull request #2088 from chrisvest/legacy-index-migration

Fix a bug where store migration forgets about legacy indexes.
Returns a copy of the suspicions set

out from the HeartbeatContext so that putting that set in a message that
gets processed and serialized later on won't risk concurrent modification
issues with other incoming message handling modifying that set.
Fix issue with cluster bricking if specific message lost when master leaves.

 o When a master leaves, if the leave learned message did not reach the machine with the
   lowest id, the other instances would wait for that instance to start an election
   indefinitely. The instance with the lowest id would realize it was out of date, but
   try and contact the (now dead) master to catch up, and would not retry when that failed.

 o This implementation fixes this by preferring instances more likely to be live and to have
   the paxos instance id we are interested in (see CommonContextStateTest and LearnerStateTest).
 o It also introduces proper retries if the catchup fails.
Aligning with TeamCity
Merge pull request #2091 from jakewins/1.9-learnit

Fixes problem with re-electing master on message loss
Remove the OSGi example.

It was removed last year from 2.0 because it was flaky and it now fails
incomprehensibly on TeamCity. There doesn't seem to be any point
spending lots of time working out what is wrong with it just for this
one unimportant example.

Conflicts:
	community/embedded-examples/src/test/java/org/neo4j/examples/osgi/Neo4jActivator.java
	community/embedded-examples/src/test/java/org/neo4j/examples/osgi/OSGiDocIT.java
Introduce the StoreChannel abstraction, and the AdversarialFSA.

The StoreChannel interface is very similar to the API of the FileChannel class.
I had to introduce it because of the many final methods of the FileChannel.
The AdversarialFileSystemAbstraction needed to be able to throw exceptions from those methods
that were marked as final in the FileChannel, so I had to abstract away the FileChannel itself, and
introduce this new indirection. The StoreFileChannel wraps a FileChannel while exposing the
StoreChannel API.

The AdversarialFileSystemAbstraction is a file system that can be configured to throw exceptions and
failures as we please. This is useful for testing partial failure scenarios that our current robustness
suite does not cover, since it currently only works by killing entire processes - not individual
transactions.