Merge pull request #2091 from jakewins/1.9-learnit

Fixes problem with re-electing master on message loss
Add a Scala-esque API for creating monitors in the Cypher land
Merge branch '1.9-maint' into 2.0-merge-1.9

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/IndexManagerImpl.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/StoreMigrator.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyStore.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/storemigration/StoreMigratorTestIT.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/LearnerContext.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/LearnerState.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/MultiPaxosContext.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/heartbeat/HeartbeatState.java
	enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/ProposerStateTest.java
	enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/heartbeat/HeartbeatContextTest.java
	enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/heartbeat/HeartbeatStateTest.java
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/cluster/zoo/ZooKeeperHighAvailabilityEvents.java
	enterprise/ha/src/test/java/org/neo4j/ha/QuorumWritesIT.java
	enterprise/ha/src/test/java/org/neo4j/ha/TestPullUpdatesApplied.java
Merge pull request #2130 from tinwelint/2.0-merge-1.9

Merge 1.9 --> 2.0
Merge pull request #2128 from tinwelint/2.1-rel-load-stop-fix

Fixed issue where relationship loading could stop mid-way
Merge branch '2.0-maint' into 2.1-merge-2.0

Conflicts:
	community/kernel/CHANGES.txt
	community/kernel/src/main/java/org/neo4j/kernel/impl/persistence/PersistenceManager.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/StoreMigrator.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyStore.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/storemigration/StoreMigratorIT.java
	enterprise/cluster/CHANGES.txt
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/SlaveStoreWriter.java
	manual/src/community/contributors.asciidoc
	packaging/standalone/standalone-advanced/src/main/distribution/text/advanced/CHANGES.txt
	packaging/standalone/standalone-community/src/main/distribution/text/community/CHANGES.txt
	packaging/standalone/standalone-enterprise/src/main/distribution/text/enterprise/CHANGES.txt
Merge pull request #2131 from tinwelint/2.1-merge-2.0

2.1 <-- 2.0
Remove unnecessary trait
Reuse existing parser rules
Merge remote-tracking branch 'upstream/2.0-maint'

Conflicts:
	community/cypher/cypher-compiler-2.0/src/main/scala/org/neo4j/cypher/internal/compiler/v2_0/parser/CypherParser.scala
Introduce CostModel and some refactoring of logical planning

* Move cost, cardinality and covered ids from LogicalPlan to PlanTableEntry.
These properties are only interesting while planning, not once the plan is finished

* Use costs and not only cardinality for picking plans
Remove the OSGi example.

It was removed last year from 2.0 because it was flaky and it now fails
incomprehensibly on TeamCity. There doesn't seem to be any point
spending lots of time working out what is wrong with it just for this
one unimportant example.

Conflicts:
	community/embedded-examples/src/test/java/org/neo4j/examples/osgi/Neo4jActivator.java
	community/embedded-examples/src/test/java/org/neo4j/examples/osgi/OSGiDocIT.java
IndexLeafPlanner: Use the syntax sugar for PartialFunction

The reason we couldn't get it to work before is that the desugared code
evaluates the predicate twice and the unit test was returning
the same iterator object every time so the first time it was used,
it'd be consumed.
Add a missing hunk from the last change
Merge remote-tracking branch 'andres/more-logical-plans'

Conflicts:
	community/cypher/cypher-compiler-2.1/src/main/scala/org/neo4j/cypher/internal/compiler/v2_1/planner/logical/IndexLeafPlanner.scala
Planning clean-up
Update QueryContext.java

typo
Add examples of SET setting multiple properties

* Added example to SET and MERGE
* Removed the provisional warning on MERGE
Merge pull request #2135 from jakub-/planning-cleanup

Planning clean-up
Touch up of naming

An index scan returns all the nodes in an index. This is an operation we still don't have in Cypher.
We have unique index seek and normal index seek.