Don't create LockElement unnecessarily. This drastically reduces object churn under normal operation, as LockableWIndow.lock() is a common operation.
Merge pull request #2559 from neo4j/poolablelocks

Don't create LockElement unnecessarily
Splits MultiPaxosContext in the same manner as in 2.0+
fix issue regarding service loader

remove reference to class residing inside monitor-logging.
Merge pull request #2569 from jakewins/1.9-paxossplit

1.9 paxossplit
Backport: Speed up consistency checking of non-constraint indexes

This improves the time complexity for consistency checking of normal non-constraint schema
indexes from an O(n^2) to O(n).

This is especielly noticable when many nodes are indexed by the same
<label,propertyKey,propertyValue> tuples.

The old code would go over all the nodes that were supposed to be indexed, and then for
each of those nodes, do a lookup on the propertyValue, and then iterate through the result
set of that look up, looking for the nodeId in question. This is obviously an oh-n-squared
amount of work, if all the nodes are indexed with the same property value.

The new code do an exact lookup for the combined <nodeId,propertyValue> in the given
<label,propertyKey> index. For our purpose, we consider this a constant cost, and so our
work now ends up being oh-n.

Conflicts:
	community/kernel/src/test/java/org/neo4j/kernel/impl/api/index/inmemory/UniqueInMemoryIndexReader.java
Merge pull request #2578 from chrisvest/2.0-backport-faster-consistency-checker

2.0 backport faster consistency checker
Indentation
Introduce UnionQuery and use it
Do a store copy on join when there are no log files for the latest transaction.

I tried writing a test for this, but SwitchToSlave is hard to write tests for,
so the fix is provided without one.
Fix GC overhead of XidImpl

- Only allow equality of XidImpl instances, not the Xid interface,
  reasoning being that hashCode cannot be equal to other xid impls since
  there is no standard, and getting a xid that isn't a xidimpl is an error,
  since the xids come from our tx manager, we do not manage other xids.

- Don't copy the branchID and globalId arrays on every equaylity check
Some refactoring in preparation for UNION in Ronja
Updates changelogs for 1.9.8
Allow Ronja to output pipes for UNION
Merge pull request #2586 from systay/union

Work against handling UNION in Ronja
Refactor query projection (also prepares for adding unwind)
Merge pull request #2588 from systay/new-query-projection

Refactor query projection
Fixed compile error. Not on Java 7 just yet.
Merge branch '1.9-maint' into 1.9-merge

Conflicts:
	enterprise/cluster/CHANGES.txt
	enterprise/cluster/src/main/java/org/neo4j/cluster/MultiPaxosServerFactory.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/BiasedWinnerStrategy.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/context/AbstractContextImpl.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/context/AcceptorContextImpl.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/context/ClusterContextImpl.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/context/CommonContextState.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/context/ElectionContextImpl.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/context/HeartbeatContextImpl.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/context/LearnerContextImpl.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/context/MultiPaxosContext.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/context/ProposerContextImpl.java
	enterprise/ha/CHANGES.txt
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/cluster/HighAvailabilityModeSwitcher.java
Handle DISTINCT with Ronja