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
Introduce the StoreChannel abstraction, and the AdversarialFSA.

The StoreChannel interface is very similar to the API of the FileChannel class.
I had to introduce it because of the many final methods of the FileChannel.
The AdversarialFileSystemAbstraction needed to be able to throw exceptions from those methods
that were marked as final in the FileChannel, so I had to abstract away the FileChannel itself, and
introduce this new indirection. The StoreFileChannel wraps a FileChannel while exposing the
StoreChannel API.

The AdversarialFileSystemAbstraction is a file system that can be configured to throw exceptions and
failures as we please. This is useful for testing partial failure scenarios that our current robustness
suite does not cover, since it currently only works by killing entire processes - not individual
transactions.
Additional cleanup after the introduction of StoreChannel
Add mischief to the adversarial file system.
Merge pull request #2132 from chrisvest/1.9-adversarial-fs

Introduce the StoreChannel abstraction, and the AdversarialFSA.
Fix building 1.9 on Java 6
Merge pull request #2144 from chrisvest/1.9-fix-java6-build

Fix building 1.9 on Java 6
Also fix the test compilation on Java 6
Introdude new Locks API, and the Forseti lock manager

 o The classic LockManager remains, but as an implementation of
   the new Locks API. It has been slightly improved to not contend
   on global data structures when taking locks it already holds.

   The classc lock manager is now referred to as the "Community
   Lock Manager".

 o Forseti is a new lock manager, available in enterprise only, it
   is faster than the community manager, and scales linearly as more
   execution threads are added. It uses a new deadlock detection
   scheme as well, which means deadlock detection is significantly
   faster and requires no pessimistic synchronization.
Raise an exception if Server shutdown fails.

Rather than just log exceptions that happen during shutdown, we
carefullly catch and record them. Then after shutdown is complete, if
there was an exception during the process we re-raise it.

This change uncovered a couple of problems that were previously being
ignored. They are cases where tests call #stop() even though #start()
did not succeed. Those #stop() methods are now more defensive to cope
with that.
Merge branch '1.9-maint' into 2.0-merge-1.9

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/DefaultFileSystemAbstraction.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/AbstractStore.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/FileSystemAbstraction.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/IdGeneratorImpl.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/RelationshipTypeStore.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyDynamicStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyNeoStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyNodeStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyPropertyIndexStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyPropertyStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyRelationshipStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyRelationshipTypeStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/TxLog.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/DirectLogBuffer.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/LogBuffer.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/LogIoUtils.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/XaLogicalLog.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/XaLogicalLogFiles.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/util/DumpLogicalLog.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/util/FileUtils.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/util/IoPrimitiveUtils.java
	community/kernel/src/test/java/org/neo4j/kernel/CannedFileSystemAbstraction.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/core/TestChangingOfLogFormat.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/index/TestIndexCommand.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/store/TestDynamicStore.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/store/TestGraphProperties.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/store/TestIdGenerator.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/store/TestPersistenceWindowPoolContention.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/store/TestXa.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/storemigration/MigrationTestUtils.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/TestXaFramework.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/LogMatchers.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/transaction/xaframework/TestPartialTransactionCopier.java
	community/kernel/src/test/java/org/neo4j/test/IdJumpingFileSystemAbstraction.java
	community/kernel/src/test/java/org/neo4j/test/LogTestUtils.java
Fixes byte count monitoring and adds some debugging output

ByteCounterMonitor implementations were being updated wrongly by many
 of the components that used them. This is now fixed.
Introduced MonitoredReadableByteChannel as a wrapper around a
 ReadableByteChannel that updates on reads a given monitor. This solves
 most issues with monitoring.
BufferedFileChannel now wraps a ByteCounterMonitor to monitor
 actual writes.
BlockLogBuffer also now updates bytes written on done().
Merge branch '2.0-maint' into 2.0-merge-1.9

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/impl/transaction/xaframework/XaLogicalLog.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/util/BufferedFileChannel.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/util/TestBufferedFileChannel.java
Merge pull request #2152 from chrisvest/2.0-merge-1.9

2.0 merge 1.9
Compile on Java8. Fixes #2149
Merge pull request #2153 from benbc/1.9-dont-swallow-server-shutdown-exceptions

Raise an exception if Server shutdown fails.
Merge branch '1.9-maint' into 2.0-maint

Conflicts:
	community/server/src/main/java/org/neo4j/server/AbstractNeoServer.java
	community/server/src/main/java/org/neo4j/server/web/Jetty6WebServer.java
	community/server/src/test/java/org/neo4j/server/web/TestJetty6WebServer.java
Fixed lock management introspection.
Merge pull request #2156 from chrisvest/2.1-fix-build-on-java8

Compile on Java8. Fixes #2149
Merge branch '2.0-maint'

Conflicts:
	community/kernel/src/main/java/org/neo4j/kernel/impl/nioneo/store/NeoStore.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyNodeStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyPropertyIndexStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyPropertyStoreReader.java
	community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyStore.java
	community/kernel/src/test/java/org/neo4j/kernel/impl/nioneo/xa/LogTruncationTest.java

Also needed changes to:
     community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyRelationshipStoreReader.java
     community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/legacystore/LegacyStore.java