Master generates and propagates an epoch

that slaves must use for all further communication with it, or fail with
InvalidEpochException. This is to prevent the scenario where one part of a
transaction or commit communicates with one master, there's a master
switch where the new master instance uses the same host and port as the old one.
If a transaction would continue through such a scenario then unexpected
things and bad things might happen.

(cherry picked from commit b76f8e34f7184e1457e37f6da6137bfbde79c3e5)

Conflicts:
	community/lucene-index/src/main/java/org/neo4j/kernel/api/impl/index/LuceneDocumentStructure.java
	community/lucene-index/src/test/java/org/neo4j/kernel/api/impl/index/LuceneDocumentStructureTest.java
	enterprise/com/src/test/java/org/neo4j/com/MadeUpClient.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/HaRequestType20.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/HighlyAvailableGraphDatabase.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/MasterClient20.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/cluster/HighAvailabilityModeSwitcher.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/RequestContextFactory.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/master/MasterImpl.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/master/MasterServer.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/slave/MasterClient153.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/slave/MasterClientResolver.java
	enterprise/ha/src/test/java/org/neo4j/kernel/ha/cluster/HighAvailabilityModeSwitcherTest.java
	enterprise/ha/src/test/java/org/neo4j/kernel/ha/com/master/MasterImplTest.java
	enterprise/ha/src/test/java/org/neo4j/kernel/ha/id/HaIdGeneratorFactoryTest.java
Merge pull request #1813 from tinwelint/1.9-backport-master-epoch

BACKPORT Master generates and propagates an epoch