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
Refactor Expand + OptionalExpand to use QueryPlan
Refactor Projection (along with Skip, Limit, Sort, SortedLimit)  to use QueryPlan
Refactor Join  to use QueryPlan
Refactor CartesianProduct  to use QueryPlan
Refactor Optional  to use QueryPlan
Refactor remaining Apply variants and OuterHashJoin to use QueryPlan
Add Visitor support for Query{Plan, Graph} and removed coveredIds from LogicalPlanStringVisitor
Remove coveredIds from LogicalPlan
Remove solved from LogicalPlan
Merge pull request #2370 from boggle/externalized-qg

Externalized qg
Fix up the merge conflict resolution
Merge pull request #2366 from systay/merge-fixup

Merge 2.0-maint into 2.1-master
Remove the QueryPlan factories from projection plans
Add availableSymbols back to logical plans
Removed uses of coveredIds