Let the database page cache be injected into the store migration, so the participants don't have to create their own if need be.

Also reduced the memory consumption of a number of tests, and transitioned many tests to using the PageCacheRule, instead of the StandalonePageCacheFactory.
Use a DURATION parser when reading the 'query time to live' from the settings

- make sure that the queryPlanTTL is read before the creation of the compilers and injected when needed to avoid
  single components to read the configuration.
Inject a Clock instead of creating manually Dates for retrieving time in plan fingerprint
Check txId on the candidate stale plan after having check the timestamp

- better code for accessing the last tx id
Inject statistics divergence threshold into the ExecutionPlanBuilder
Fix flakiness: UniqueConstraintStressIT

The expected result set was not sufficiently large; specifically
creating the constraint can fail and cause some of the node creation
to fail as well, not due to a constraint violation, but due to a
concurrent schema creation on master. The old code had several
logical faults.

The slave transactions can also fail due to a ComException, due to the
RequestContext used for the lock-session on master already being
in use. This is a known and expected behaviour in itself, but it
is not really known why it occurs in this test since it only has one
thread doing slave transactions. The strategy so far is to catch
and ignore it, but it is probably worth investigating and explaining.
Test: UniqueConstraintStressIT: Add different order of operations.

Add three more tests with different order and timing of the operations.
Merge pull request #3530 from davidegrohmann/2.2-replan-ref

Refactor of replanning code
Merge pull request #3533 from martinfurmanski/2.2-unique-constraint-stress-it

2.2 unique constraint stress it
StandalonePageCacheFactory changes

- Introduces a new StandalonePageCache interface which is AutoCloseable
- Make the StandalonePageCacheFactory return a StandalonePageCache
  implementation
- Updated all the various tools to use try-with-resources for their one-off
  page caches
Merge pull request #3518 from chrisvest/2.2-migration-page-cache

Let the database page cache be injected into the store migration, so the participants don't have to create their own if need be.
Don't let tests be affected by NTP syncing
Update neo4j-desktop to use the right path for the authorization store
Lock-free loading of relationships

Removes node lock previously used during loading of relationships. This
lock would contend with committing transaction and produce latency issues.
The lock prevented cache poisoning issues introduced by race conditions
between committer and reader(s).

To achieve a lock-free solution some guards had to be added for various
corner cases. These are:
- Committers are now aware of ot he fact that, and parries for,
  concurrent readers loading and caching relationships committed by the
  committer, before the committer has put them into cache itself,
  producing duplicates when the committer would add them.
  (Issue comes from the fact that store is updated before cache).
- Committers uses knowledge about how relationhips are stored on disk to
  be able to tell if any reader has loaded the relationships it has just
  written to the store, before updating the cache. This logic sits in a
  filter which is consulted before adding relationships to the cache.
- Nodes evicted from cache as part of being upgraded from sparse to dense
  now happens as part of updating the node instead of as a separate step
  during commit. This to also guard for concurrent readers.
- Simplification and reduction of code and logic of DenseNodeChainPosition
  where all individual chain positions are initialized eagerly, so that
  the filtering logic (as mentioned above) becomes simpler.
- Ordering of relationship-related records when applying transaction
  to store changed to: relationships, relationship groups, nodes so that
  additions to relationship chains are seen atomically by concurrent readers.
Merge pull request #3536 from tinwelint/2.2-lock-free-load-rels

Lock-free loading of relationships
Broke out property encoding into separate step
Parallelized property encoding in batch importer

by defering creation of property records until time of writing.
PropertyEncoderStep can have multiple threads encoding properties into
PropertyBlocks, attaching them to each entity.
Moving average for batch importer stats
Dynamically (re)assign processors to slowest importer steps

to optimize steps that are seen to be bottle necks. For this the ability
to have multiple stage execution monitors with individual poll interval,
and a custom task executor with dynamically changable thread count have
been added. Both ExecutorServiceStep and IoQueue uses TaskExecutor.

There's an execution monitor that constantly whatches where processors are
assigned and (re)assigns more or less to those where it sees fit.