Added test for slave-only instance being elected coordinator
Fixes so that slave-only instances not only try not to win elections, but actively don't switch to master in the case they are coordinators (e.g. because the instance created the cluster)

Conflicts:
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/HighlyAvailableGraphDatabase.java
	enterprise/ha/src/test/java/org/neo4j/ha/TestSlaveOnlyCluster.java
Logging performance optimizations:
* Fixed custom Jetty logger to caches isDebugEnabled
* Changed LogbackService to cache isDebugEnabled
* Added isDebugEnabled check before toString() in GCResistantCache

Only add security filter if there are security rules
Fixed merge issues
Merge pull request #2341 from rickardoberg/slaveonlyfix2

Slave-only instances no longer becomes master
Merge pull request #2348 from rickardoberg/optimizedlogging4

Optimize logging and HTTP filter
Merge branch '1.9-maint' into 2.0-merge-1.9

Conflicts:
	community/server/src/main/java/org/neo4j/server/logging/JettyLoggerAdapter.java
	community/server/src/main/java/org/neo4j/server/web/Jetty6WebServer.java
	enterprise/ha/src/main/java/org/neo4j/kernel/impl/cache/GCResistantCache.java
Merge pull request #2375 from chrisvest/2.0-merge-1.9

2.0 merge 1.9
Plug a file descriptor leak

Turns out we did not properly close our IndexReaders when the transaction contained relevant changes
and wrapped the lookup iterators (that are resources) in diff-applying iterators (that are not).

This fixes #1799
Shebang lines must have a ! in them.
Merge pull request #2381 from chrisvest/1.9-fix-shell-shebang

1.9 fix shell shebang
Refactoring of QueryPlan construction

Moved all QueryPlan producers into an object - QueryPlanProducer
Merge pull request #2383 from systay/queryplanproducer

Refactoring of QueryPlan construction
Update AggregationAcceptance test to not use START
Merge pull request #2385 from systay/aggregation-acceptance

Update AggregationAcceptance test to not use START
Merge pull request #2380 from chrisvest/2.0-file-descriptor-leak

2.0 file descriptor leak
Merge branch '1.9-maint' into 2.0-maint
Merge branch '2.0-maint'

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/impl/api/StateHandlingStatementOperations.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/api/store/CacheLayer.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/api/store/StoreReadLayer.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/util/DiffApplyingPrimitiveIntIterator.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/util/DiffApplyingPrimitiveLongIterator.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/api/state/IndexQueryTransactionStateTest.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/HighlyAvailableGraphDatabase.java
	enterprise/ha/src/test/java/org/neo4j/ha/TestSlaveOnlyCluster.java
Get rid of the hand-crafted equivalence definition for QueryGraph

We moved out the pattern -> query graph lookup table into the context.

Enabling the proper QueryGraph equality exposed issues with how we handle
optional matches and WITH.
Merge pull request #2387 from jakub-/query-graph-equivalence

Get rid of the hand-crafted equivalence definition for QueryGraph