Introduce cache.memory_ratio configuration for HPCache

New set-and-forget configuration that specifies cache size as a ratio of the
old generation max size. Memory division across internal components of the cache
is handled by fixed ratios.

If any of the old config (now referred to as "advanced config") is set, it will
override the memory_ratio configuration.
Everything not starting with 'cmdchar' is cypher.

* Also remove old debug message
Change dest to 'fonts'.
Cleanup EideticRequestMonitor
Update Codemirror

* Codemirror 4.5
* angular-codemirror-ui 0.1.6
Fix Codemirror shortcuts

* Moving some keys from global listening.
* Move Codemirror keymap config to Editor class.
* Run $digest upon codemirror model update.
* Mac shortcuts fixed (Cmd-Up/Down/Enter)
Improvements to the application pause monitor.

- Use System.nanoTime() to remove false-positive from network time adjustments
  and other external factors.
- Don't track total block time, It isn't a useful metric and it was confusing.
- Have the "trigger" level be the max block time that's acceptable, rather than
  the max block time plus the monitor pause interval.
- Bump the default block time trigger level to 200ms
- Introduce a manual mechanism to verify that the monitor works.
Log when property chains have duplicates

* Introduces the cappedLogger in StringLogger.
* Add a PropertyChainVerifier that checks the consistency of property chains as
  they are loaded.
* Add a PropertyChainVerifier implementation that logs when it finds
  duplicates.
Introduces CC check for duplicate property indexes in a given property chain

The check happens on first property checks, which then traverses the whole
 chain, recording duplicates
Adds a new report error in ConsistencyReport for the new type of inconcistency

As a note, this is a slight bending of the CC framework. It is the first check
 that requires state, whereas all previous cases required single record access
 only. Whether we change CC to accomodate this or we add a new type of "stateful"
 checks, that remains to be seen.

Moves logging for the runtime detector to be a responsibility of NodeManager,
 via an Observer pattern
Add a timeout on the failedLatch which waits for the master to disappear

- removed the electedLatch since we can use cluster.await instead
Fixed cardinality calculations for bidirectional patterns
Cleanup ReadableLogChannel and LogVersionedStoreChannel interfaces

- Rationale:
  there is obviously some conflation between ReadableLogChannel and LogVersionedStoreChannel interfaces -
  neither purpose is clear and while the functionality they provide is necessary, it is not abstracted correctly.

- Details:
  This PR tries to cleanup those interfaces by extracting and isolating the different abstractions in them, e.g.,
  decoupling the getCurrentPosition and getVersion/getFormatVersion from the read API in ReadableLogChannel.

  It also introduces more specialised interfaces like ReadableVersionableLogChannel which exposes log version
  information when necessary, i.e., when the channel is backed by a log file on disk. In this way we can clean
  up other implementations, like NetworkReadableLogChannel which does not contain log version info.

  Finally, a factory has been introduce to simplify the creation of LogEntryReaders according to the use case.
Clarify default cache type per edition
Added handling of optional match to QueryGraphCardinalityModel
Fix an issue reading transaction logs over network.

NetworkReadableLogChannel should not check if there is enough data available before reading.
Netty will throw an IndexOutOfBoundsException if the network stream doesn't supply enough data
to match the requested type.

ReadPastEndException was refactored as a singleton without stack trace as it is a common and
expected case in the code paths.

Also removed some logging previously added for debugging this issue.
Merge pull request #3092 from davidegrohmann/2.2-avoid-unboud-wait

Add a timeout on the failedLatch which waits for the master to disappear
Merge pull request #3094 from thobe/2.2-counts-store

Number of relationships given node label.
created disk-backed recordkeeper/ verifier so that we can run experiments on large files
Merge pull request #3056 from davidegrohmann/2.1-cleanup-eidetic-req-monitor

[2.1] Cleanup EideticRequestMonitor
Merge branch '2.1-maint' into 2.2-merge-2.1

Conflicts:
	enterprise/ha/src/test/java/org/neo4j/ha/monitoring/EideticRequestMonitor.java
	enterprise/ha/src/test/java/org/neo4j/ha/monitoring/RemoteRequestMonitoringIT.java