Properly closes http client to avoid single-connection conflict
Changes to better support Neo4j Desktop app

o Specifies service classes instead of packages to JAX-RS. Specifying
  packages requires JAX-RS to scan the classpath and doing that makes it
  more sensitive to environment changes... such as running the whole
  application inside a wrapped .exe file.
o Changes so that Configurator#getDatabaseTuningProperties() is always
  honored. This makes it much easier to pass in any Configurator implementation.
o JAX-RS ServletHolders gets created after all modules have registered all
  its service, since multiple modules might register at the same mount point.
  This problem became apparent due to the classes/packages change above.
Merge pull request #949 from tinwelint/desktop-server-changes

Changes to better support Neo4j Desktop app
Extra debugging output, some useless field removal, tcpNoDelay added
Fixes responding to internal messages, having it handle the headers properly
Fixes case where single HA instance would perpetually try to elect a master

When an HA instance is alone in the cluster, it will try to contact every
 other instance (i.e. none) for votes and, since by default it holds the master
 role itself, being the only instance, it will wait for the first response
 to come before asking itself. But a response never comes, so the election
 time outs, rinse repeat. This commit fixes that.
It also introduces a test case that demostrates the problem.
Finally, it refactors the ElectionContext to not require delegation
 from ElectionState method calls, making mocking easier.
fixes concurrency issue due to shared instance variable for JsonGenerator #955
fixes #961 wrong content-encoding instead of content-type charset=utf-8
Check if server can be started before starting it for server tests

Make the error message a bit more explicit if there is already a neo4j instance
running on localhost:7474
Merge pull request #963 from mneedham/server-check

Check if server can be started before starting it for server tests
Merge pull request #957 from jexp/955

Eyeballed this, seems sane.
Merge pull request #962 from jexp/content-encoding

fixes #961 wrong content-encoding instead of content-type charset=utf-8
mandatory transactions for server
o ensured tests create transactions as appropriate
o ensured RestfulGraphDatabase, BatchOperationsService and CypherService are wrapped in TransactionFilter
o ensured streaming output is written before TransactionFilter finishes transaction
Fixes docs bugs for new indexing in core API.
fixing docs build
Removing multiple labels from node with large number of labels.

Previously this would result in data corruption, this change resolves that issue.

This problem manifested in scenarios when a node has so many labels that multiple
dynamic records are used for holding them.

The problem was that when a label was removed that caused one of the dynamic records
to not be in use anymore, this record would be marked as !inUse, which makes it light.
If in the same transaction another label is removed from that same node, the labels are
first read from the records, including the one marked as !inUse. Since this record is light,
reading data from it will cause it to be made heavy, reading back the data from the store
into it, thus reading back data that should have been removed, leading to an inconsistent
state.

The solution implemented is to also mark the record as empty, meaning that when the
record is made heavy as part of reading the labels from it, no data will be read (a byte[0]).
A simple optimization has been implemented for the case when a record is empty, to not
actually read any data from the store, only mark it as heavy by assigning a pre-allocated
byte[0].
Merge remote-tracking branch 'neo4j/master' into 2.0

Conflicts:
	advanced/server-advanced/src/main/java/org/neo4j/server/advanced/modules/JMXManagementModule.java
	community/server/src/main/java/org/neo4j/server/database/CommunityDatabase.java
	community/server/src/main/java/org/neo4j/server/modules/RESTApiModule.java
	community/server/src/test/java/org/neo4j/server/WrappingNeoServerBootstrapperDocIT.java
	community/server/src/test/java/org/neo4j/server/database/EphemeralDatabase.java
	community/server/src/test/java/org/neo4j/server/database/TestCommunityDatabase.java
	community/server/src/test/java/org/neo4j/server/helpers/ServerBuilder.java
	community/server/src/test/java/org/neo4j/server/modules/RESTApiModuleTest.java
	enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/TestEnterpriseDatabase.java
	enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/functional/EnterpriseServerIT.java
	packaging/qa/src/test/java/org/neo4j/qa/features/StartAndStopFeatureTest.java
Merge remote-tracking branch 'neo4j/master' into 2.0

Conflicts:
	community/server/src/test/java/org/neo4j/server/helpers/ServerHelper.java
Merge pull request #971 from cleishm/2.0-master-merge

2.0 master merge
Merge pull request #974 from thobe/remove-labels-fix

Resolves issue where removing multiple labels from a node with a large number of labels would result in corruption.