Fixes issue with role election in cluster

Introduces tests and fixes for some edge cases that role election
 may come up against
Votes received that are actually delayed responses from a previous
 election could lead to wrong results. This is now guarded against
 by having versions marking elections and vote requests/responses
Election results could be reordered if one would fail to be
 broadcasted. Now this is guarded against by an election epoch, allowing
 election results to be ignored.
Instance and vote count could become wrong if an instance voted
 and then was marked as failed before the election finished. That could
 lead to cases where the role holder was not asked for a vote. Now,
 ElectionContext registers as a HeartbeatListener and will invalidate
 votes of instances that have failed.
This is added with backwards compatibility, so elections initiated by
 previous version instances will still go through and receive proper
 responses.
Merge branch '1.9-maint' into 1.9-election-fixes
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

Conflicts:
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/HighlyAvailableGraphDatabase.java
	enterprise/ha/src/test/java/org/neo4j/ha/TestSlaveOnlyCluster.java
	enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/StandaloneHaInfoFunctionalTest.java
Added test for slave-only instance being elected coordinator
Makes election respect elector versions.
Ability to return paths with diminishing cost from Dijkstra/TraversalAStar

Algorithm object accepts parameter whether or not to retain sufficient
information to be able to, in addition to returning the best path(s),
continue to return paths in order of diminishing cost. Retention requires
more memory and has some performance impact as well, but only if enabled.
Merge pull request #2321 from tinwelint/1.9-best-first-carry-on

Ability to return paths with diminishing cost from Dijkstra/TraversalAStar
Updates elector and version in all incoming election results
Merge pull request #2314 from digitalstain/1.9-election-fixes

Fixes issue with role election in cluster
Fix compilation on Java 6.
Merge branch '1.9-maint' of github.com:neo4j/neo4j into 1.9-maint
Also fix compilation of tests in Java 6
including javadocs in manual
whoopsie
Fixes for bringing javadocs next to the manual in 1.9.x.
not publishing components anymore
Copy javadocs to the correct locations in 1.9.x.
Make the PWP race test less flaky on Windows
Merge branch '1.9-maint' into 2.0-maint

Conflicts:
	community/cypher/pom.xml
	community/cypher/src/docs/dev/java/index.asciidoc
	community/embedded-examples/pom.xml
	community/embedded-examples/src/docs/dev/hello-world.asciidoc
	community/embedded-examples/src/docs/dev/management.asciidoc
	community/embedded-examples/src/docs/dev/setup.asciidoc
	community/embedded-examples/src/docs/dev/traversal-framework.asciidoc
	community/embedded-examples/src/docs/dev/traversal.asciidoc
	community/embedded-examples/src/docs/dev/unique-nodes.asciidoc
	community/embedded-examples/src/test/java/org/neo4j/examples/TraversalDocTest.java
	community/graph-algo/src/docs/dev/index.asciidoc
	community/kernel/pom.xml
	community/kernel/src/docs/dev/transactions.asciidoc
	community/lucene-index/pom.xml
	community/lucene-index/src/docs/dev/index.asciidoc
	community/neo4j/pom.xml
	community/server/src/docs/dev/rest-api/traversals.asciidoc
	community/server/src/docs/ops/security.asciidoc
	community/shell/src/docs/dev/shell.asciidoc
	cypher-plugin/pom.xml
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/atomicbroadcast/multipaxos/MultiPaxosContext.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/cluster/ClusterConfiguration.java
	enterprise/cluster/src/main/java/org/neo4j/cluster/protocol/election/ElectionContext.java
	enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/cluster/InstanceIdTest.java
	enterprise/cluster/src/test/java/org/neo4j/cluster/protocol/election/ElectionContextTest.java
	enterprise/ha/pom.xml
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/HighlyAvailableGraphDatabase.java
	enterprise/ha/src/test/java/jmx/JmxDocTest.java
	enterprise/ha/src/test/java/org/neo4j/ha/TestSlaveOnlyCluster.java
	manual/javadocs/LICENSES.txt
	manual/javadocs/NOTICE.txt
	manual/javadocs/pom.xml
	manual/pom.xml
	manual/src/operations/installation-deployment/deployment.asciidoc
	packaging/pom.xml
	pom.xml
Merge pull request #2414 from digitalstain/2.0-maint

Merge 1.9-maint into 2.0-maint