Add monitor to planning

o add a Monitor that keeps track of how long time each stage Cypher compiler takes
Add cache monitoring
Fix for local lock reference counting on manual release of locks.
Merge pull request #2188 from davidegrohmann/cache-logging

Add monitors for query cache and ast cache
Cleanup logical planning tests
Merge pull request #2190 from davidegrohmann/ronja-logical-planning-test-cleanup

Cleanup logical planning tests
Change existing metrics to be plain functions for easier composition
Renaming leaves test package to plans and killing use of DummyPosition in that package
Introduce separate selectivity estimator metric
Introduce MetricsFactory to better control how metrics are constructed

This serves to factor out caching and test support facilities from metrics construction
Fix SimpleCostModel such that Selection cost considers its own selectivity
Add CartesianProductPlanningIT test to check cartesian products are picked based on selectivity
Rename methods in OverridableMetricsFactory for clarification
Merge pull request #2192 from boggle/ronja-selectivity-metric

Introduce selectivity metric and refactor metric handling in Ronja
Move aggregation preparation to a rewriter

Moves the isolating of aggregations into
one of the new rewriters working directly
on the AST.
Cleaned up imports
Merge pull request #2193 from systay/aggregation-isolation

Move another rewriter to the new AST
Remove Function*WithImplicit1

The idea was that it would allow us to nicely use function composition
with implicits parameters. In practice, because the class is not a function
type, you could not use the function sugar syntax to build those objects
which made the resulting code cumbersome in some cases.
Rename SimpleLogicalPlanner to GreedyOperatorOrderingPlanner
Merge pull request #2194 from jakub-/simple-logical-cleanup

SimpleLogicalPlanner cleanup