Slave goes through 'switchToSlave' process on every 'masterIsElected' event
Fix an ABA bug in the page cache

We were reusing the MuninnPage objects in the MuninnPageCache.freelist.
This could lead to cycles in the freelist through an ABA-bug.

The test that exposed that bug is ignored for now, because it is exposing
another bug that I thought was just a different manifestation of the ABA-bug.
Fixes an issue which made it impossible to resume a migration

i.e. when the migration had been completed, and the migration aborted...
when it would be picked up again the next time to do the moving of files
from migration directory to store directory there would be an assumption
that the "migrate" method would have been run before it. This led to an
NPE for an uninitialized field.
Updates changelogs for 1.9.9 with last batch of changes
Fixes tests that left threads behind after run

introduced a simple tracking method that can be used for labelling
threads, only active if assertions are enabled.
Merge pull request #3252 from tinwelint/2.1-resume-migration-fix

[2.1] Fixes an issue which made it impossible to resume a migration
Merge pull request #3217 from lutovich/1.9-slave-epoch-mismatch

[1.9] Slave goes through 'switchToSlave' process on every 'masterIsElected' event
Merge branch '1.9-maint' into 2.0-maint

Conflicts:
	enterprise/backup/CHANGES.txt
	enterprise/ha/src/test/java/org/neo4j/ha/TestSlaveOnlyCluster.java
Merge branch '2.0-maint' into 2.1-maint

Conflicts:
	enterprise/backup/CHANGES.txt
Merge branch '2.1-maint'

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/StoreMigrator.java
	enterprise/ha/src/test/java/org/neo4j/ha/TestSlaveOnlyCluster.java
	enterprise/ha/src/test/java/org/neo4j/kernel/ha/ClusterTopologyChangesIT.java
	enterprise/ha/src/test/java/org/neo4j/test/AbstractClusterTest.java
Merge pull request #3259 from tinwelint/2.2-clean-test-litter

[2.2] Fixes tests that left threads behind after run
Merge remote-tracking branch 'upstream/master'
Adds index id to init/start logging of IndexingService
Merge pull request #3247 from chrisvest/2.2-pagecache-freelist-aba

[2.2] Fix an ABA bug in the page cache
Fixes a test relying on recently changed index logging
This chnage will expose a way to ask a lucene index to sample the percentage of different value
present in the index. I.e., it scans a given sample size of the indexed value by skipping at a
given frequency. The return percentage is computed as uniqueSampledValues / sampleSize.

Avoid using a hashset for computing unique index values but rather use sampling