Changes lifecycle of Neo4jJobScheduler

Neo4jJobScheduler created and destroyed its expensive resources
 in start() and stop(), respectively. This is generally something
 that must happen in init() and shutdown(), while the actual operation
 and use of those resources should be controlled in start()/stop(). This
 meant that users of the scheduler that created jobs in their init()
 method would get NPEs. This is now changed and it is safe to add
 jobs in the scheduler once it's init() has been called
Merge branch 'master' into 2.1-updatepuller-behave
Ensures update pulling is not performed by the master instance

The update pulling thread would not listen to instance state changes,
 which could lead up to the master instance pulling updates
 from itself. While that is not dangerous, it complicates things
 unecessarilly, what with an extra thread running and unecessary
 load created. This commit makes the update puller listen to
 changes in the instance state and start/stop as required.
Adds test for newly introduced behaviour
Merge branch 'master' into 2.1-updatepuller-behave

Conflicts:
	enterprise/ha/src/main/java/org/neo4j/kernel/ha/com/master/MasterImpl.java
	enterprise/ha/src/test/java/org/neo4j/ha/TestSlaveOnlyCluster.java
	enterprise/ha/src/test/java/org/neo4j/ha/TransactionConstraintsIT.java
Merge branch 'master' into 2.1-updatepuller-behave
Makes pullUpdates boolean flag in UpdatePuller volatile

UpdatePuller.pullUpdates is read and set by multiple threads, so it
 needs to be volatile
Merge branch 'master' into 2.1-updatepuller-behave

Conflicts:
	community/cypher/cypher/CHANGES.txt
	community/embedded-examples/src/docs/dev/setup.asciidoc
	community/embedded-examples/src/docs/dev/social.asciidoc
Merge branch 'master' into 2.1-updatepuller-behave

Conflicts:
	enterprise/ha/src/test/java/org/neo4j/ha/TestSlaveOnlyCluster.java
Merge remote-tracking branch 'origin/2.1-updatepuller-behave' into 2.1-updatepuller-behave
Fix an issue in StoreChannel.writeAll() where bytes written was not checked.
Improve Forsetis try-shared-lock.

- There was a case where try-shared would not grab a shared lock if another
  thread had just released the last reference to the lock (thus disposing
  of it). If we come a across a lock like that, we should just retry.
Re-enable index support for IN queries
Fix regression on ast rewriters
Resolves a 2.1.1 recovery issue.

- Due to a buffer offset error, after recovery the database would end up in
  a dangerous state where it would potentially fail to recover from a
  second crash if there had not been a log rotation or a safe shutdown.
Merge pull request #2509 from jakewins/2.1-recovery

Resolves a 2.1.1 recovery issue. Fixes #2492
Merge pull request #2508 from davidegrohmann/rewriter-performance-fix

Ast rewriter performance fix
Merge pull request #2502 from jakewins/2.1-forseti-improved-try

Improve Forsetis try-shared-lock.
Be more strict about encoding when counting bytes the StoreFileChannelTest
Merge pull request #2478 from jakewins/2.1-writeall

Fix an issue in StoreChannel.writeAll()
Improved intro text