Lift decision on which PlanType to use up to ExecutionPlan.run

This ensures that we use the same plan for both the profiled and normal case
Rename PlanType to ExecutionMode
Expose schemaStateFlush() from kernel
Test interaction of different execution modes with query caching
Log rotation won't happen on kernel panic

Log rotation checks that the kernel is still healthy, while having the
logFile lock, before doing the rotation. This to be on the safe side in
the event of panic, ehere the next recovery will have a chance to repair
the damages if all transactions are still in the active log.

For this the TransactionAppender#append method decides on success or panic
while holding the logFile lock and therefore safely communicates this
state to any log rotation happening concurrently.
PlanTable uses QueryGraph instead of set of available symbols as keys
Split PlanTable into GreedyPlanTable for greedy planning and ExhaustivePlanTable for exhaustive planning

- using the new ExhaustivePlanTable in the exhaustive planning
Merge pull request #3674 from boggle/lift-plan-type

Lift decision on which PlanType to use up to ExecutionPlan.run
Merge pull request #3704 from davidegrohmann/dp-exhaust

Refactor PlanTable
Merge pull request #3701 from tinwelint/2.2-dont-rotate-on-failure

Log rotation won't happen on kernel panic