Introduce pooling of KernelTransactions.
Slave goes through 'switchToSlave' process on every 'masterIsElected' event
Reapply reverted commits

4700f7f653cbb09896bdad6009e175a61808057c:
Convert tests to CypherFunSuite

4501bd22519c07e674e4a8edc5c59daa19f9cc3e:
Rename mergeUp & mergeDown to supremum & infimum
AKA leastUpperBound and greatestLowerBound

c8ce10c2063b3c52d7eab56b0d4598ffe1c13eee:
Make TypeRange and TypeSpec clearer
Adds documentation and cleans up some tests
CappedOperation does not trigger on first time event

Previously, a CappedOperation was triggered the first event regardless of
which triggered were specified. This was unexpected and counter intuitive,
especially for cases (where it is most used) where a CappedOperation was
added as a time-based logger and a log statement was expected to be
printed after the specified threshold, it would log immediately as well.
Fixed so that the cost is minimized when combining three plans with cartesian products.
Unignored a bunch of compiler tests
Updated pom.xml so that mvn exec:java works again in server.
Merge pull request #3215 from pontusmelke/fix-cartesian-products

[2.2] Fixed so that the cost is minimized when combining three plans
Removes console output from GraphDatabaseServiceTest
Fixes XaLogicalLog shutdown issue

XaLogicalLog.close() was flushing the store files after
 marking the active log file as applied. This could
 lead to recovery not happening if shutdown
 failed within a narrow window between log
 shutdown and store flush. This is now fixed.
The LogBackedXaDatasource defined a stop() method that
 managed log lifecycle without having to. This is now
 removed and log lifecycle control is delegated to
 subclasses through XaContainer.
Ensure parse errors are propagated for badly escaped statements in server
Fixed bug when combining path expressions and order by in Cypher.
Wrap text in editor before the buttons.

* Adds 52 px margin-right
* Fixes #3223
Merge pull request #3228 from pontusmelke/fix-server

[2.2] Small fixes to server
Merge pull request #3230 from pontusmelke/type-bug

[2.2] Fixed bug when combining path expressions and order by in Cypher.
Fix for #2907, labels on varlength patterns where not checked properly.
Make type rules in Add clearer

Taken from #3235
Merge branch 2.1-maint
Merge pull request #3245 from cleishm/type_clearup

[2.0] Make type rules in Add clearer
Single thread pulling updates on HA machines

Moving from an HA communication design where updates gets streamed from
the master on most individual requests coming from slaves. This design
caused lots of duplicate transactions being streamed from master to each
slave, specifically if slaves issued write requests to the master.

Moving to a design where slave communication with its master does not
stream back transactions, except when doing store copy. Instead master
returns a transaction obligation saying which transaction id that must be
applied in order to continue. The slave will notify the single update
puller about that and will in turn be notified by the update puller
when that transaction has been applied. Many requests can poke the update
puller simultaneously and transaction pulling will piggy back on each
other, since there's only one thread pulling.

Benefits include:
- No code explicitly dealing with and preventing pull storms
- Less network communication with master
- Less load put on master
- Possibility for more optimizations regarding applying updates on slaves
  since updates are pulled in a single thread only.