Merge pull request #1813 from tinwelint/1.9-backport-master-epoch

BACKPORT Master generates and propagates an epoch
Fixes problem with parser not being thread safe
Merge remote-tracking branch 'systay/1.9-parser-threading' into 1.9-maint
Restores JDK 6.0 compatibility

AutoCloseable is not part of Java 6.0 so we cannot be using it in this branch
Updated rolling upgrade 'quick verification' IT test so that it can be used again
Fixed some issues with the test itself
Completes the change where FileLock throws IOException or returns an instance, i.e. stops using null for failure signal

(cherry picked from commit 0a5eb2aba58c9caf5061d88d20818157011a9add)

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/CommonAbstractStore.java
	community/kernel/src/test/java/org/neo4j/kernel/StoreLockerTest.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/store/TestOsSpecificLocks.java
	community/kernel/src/test/java/org/neo4j/unsafe/batchinsert/BatchInserterImplTest.java
	enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/heartbeat/HeartbeatContextTest.java
	enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/heartbeat/HeartbeatStateTest.java
	enterprise/ha/src/test/java/org/neo4j/kernel/ha/cluster/HighAvailabilityModeSwitcherTest.java
Gets rid of even some more null handling for FileLock

which is nowadays unnecessary. Also throws the expected IOException,
instead of an IllegalArgumentException if the lock couldn't be had from
the FileChannel. May bad, introduced in
0a5eb2aba58c9caf5061d88d20818157011a9add.

(cherry picked from commit e9d762bacf0d3d5c355069e25efdff09d2d68c29)

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/FileLock.java
Cope with version check of very short store files.

Fixes a bug where the server would be unable to start if specific store files were
very short and where the database had not been shutdown cleanly.

(cherry picked from commit 44c3e320330ecd71b687268c35ea7b436b553fbb)

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/StoreFactory.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/CurrentDatabase.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/UpgradableDatabase.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/storemigration/StoreUpgraderInterruptionTestIT.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/storemigration/StoreUpgraderTestIT.java
added status endpoint to indicate ability to process transactions, additional to the existing master/ slave endpoints

(cherry picked from commit d3da2c164fd1c8d22e3a5d499c4775dad85bdb28)
Fixes problem with parser not being thread safe

(cherry picked from commit d3da2c164fd1c8d22e3a5d499c4775dad85bdb28)
Mark 'neo4j/1.9-maint' as merged into master
Ensure InputTokens in the AST do not affect equality

Also:
- Use Option[Identifer] to indicate named vs anonymous nodes / rels in AST
- Use boolean to indicate DISTINCT closing clauses
- Ensure stateless building of legacy Query
Add additional tests
Merge pull request #1835 from cleishm/ast

Ensure InputTokens in the AST do not affect equality
Some initial porting from that old bloody branch