Throws plain DeadlockDetectedException during commit

instead of TransactionFailureException. A recent change in timing when
records where changed in a transaction (from the point of the change, to
the point where the transaction committed) had some deadlock exceptions
converted into TransactionFailureException instead. This commit changes
that back so that the transaction surface looks the same in that sense.
Add rewriters for normalizing WITH and RETURN
Normalize WITH and RETURN clauses before check
Use pre-semantic-check rewriters in integration tests
Add ScopeTreeTest
Move files to the correct location

Also adds a maven check so 2.2 does not build if 2.1 files are left around
Move dependency analysis to Expression
Merge pull request #3051 from systay/clean-2.1-files

Move files to the correct location
Merge pull request #3050 from tinwelint/2.2-throw-plain-dde-during-commit

Throws plain DeadlockDetectedException during commit
Updated javadoc after transaction pooling was disabled
Moved use case specific error message to correct place
Merge pull request #3037 from jakub-/pre-check-normalization

Pre check normalization
added stress tests for standard and muninn page caches
documenting stress tests
Add a cardinality estimator based on the query graph

Signed-off-by: Jakub Wieczorek <jakub@jakub.cc>
Add QueriedGraphStatistics that collect statistics using core API at runtime