Refactoring of record positions in NeoStore
Errors in Bootstrapper.start are logged to System.out if logging failed to initialize
Merge pull request #3634 from lutovich/2.1-npe-in-bootstrapper-catch-block

Null-safe logging in Bootstrapper
Merge '2.1-maint' un 'master'

Conflicts:
	community/server/src/main/java/org/neo4j/server/Bootstrapper.java
Stores checksum of last transaction in neostore record

This means that there is no longer a need for having a "last transaction"
in a transaction log for the sole purpose of extracting a checksum from
its start entry. This simplifies usages around backup and HA.

This commit also changes the HA protocol, the handshake specifically,
where previously the handshake contained a checksum and a masterId for
that transaction. That wasn't necessary to have since that masterId value
was and is already part of the checksum.
Unknown relationship types in a dense node should not cause relationship loading
Unknown relationship types in a dense node should not cause relationship loading
(cherry picked from commit 5116cd0)
Muted broadcast failure msg when there are not enough instances in the cluster to constitute a quorum.
Fixed a collision handling issue in IdMapper

where encoded values where compared before clearing an internal collision
flag on each value. Better testing was added around collision handling to
assert correct behaviour there as well.
Merge pull request #3631 from tinwelint/2.2-no-need-last-tx

Stores checksum of last transaction in neostore record
Reserved rel-type records are marked not inUse during id generator rebuid
Reduce the probability of false dead-locks on index entries

Our locking API works on tuples of a ResourceType and an opaque resource id, represented as a 64 bit long.
This works great for node and relationships, as the resource id is just the record id.
Schema index entries, however, are actually tuples of label, property key and the indexed value.
Therefore, when we take a lock on an index entry, we produce a hash of the index entry tuple and take a lock on the hashed value.
It turns out that the hash function we previously used for these index entries, was quite prone to producing collisions.
Especially amongst values that are close to each other in an ordered sequence.
In the test I've added here, I saw a collision ratio of about 10%.
The new hash function is much more robust, and shows a 0% collision ratio, which only makes sense since we're dealing with a mere 25 million entries.
A sample set size that is practically microscopic compared to the space that is available to us in 64 bits.
If the 64 bit state space was all the sand in Sahara, our test would have looked at 2.5 million tons of sand (not as informative as I would have liked, but I had fun calculating it).
Fix Javadoc links in GraphDatabaseService.
Move naming of pattern elements in pattern relationships to Planning

This commit achieves the following invariants:

o In Planner, every identifier is covered by semantic table.
o All pattern elements are named in Planner, except if inside a PatternExpression
Merge pull request #3648 from jotomo/javadoc-links

Fix Javadoc links in GraphDatabaseService.
Merge pull request #3637 from chrisvest/2.2-index-hashing

Reduce the probability of false dead-locks on index entries
JSON Serialization Performance

Don't flush when the Jackson UTF8 buffer is full but when the http stream flushes
Fix flaky tests, that rely on HasMap order (Java7 vs. Java8)
Merge pull request #3640 from davidegrohmann/2.2-fix-flaky-test

Fix flaky tests by adding a custom matcher
Refactor NeoStoreDataSource into modules, with clear dependencies (external and internal), and introduce Recovery,LogRotation, and LogPruning as separate processes.

The recovery process now works on its own channel to the underlying logs, so there is no longer any assumption that after recovery PhysicalLogicalLog can continue with the same channel. Instead it opens its own channel and moves to the end.
At the end of recovery, the log is truncated at the last properly read transaction, to cut off any scrambled transactions due to killed processes.

UpdateableSchemaState and its implementation didn't have anything to do with IAGD, so it was moved into NSDS.

Log pruning is now a separate process, that uses monitor callbacks to trigger when to run.
Log rotation extracted into its own process.