MODE-1524 Changed Infinispan Externalizer implementations

The Infinispan Schematic Externalizers were changed from implementing AdvancedExternalizer
(which has some benefits but also issues in AS7.1) to Externalizer (which works in all environments
but isn't as efficient as AdvancedExternalizer).

One important fix: several of the externalized classes did not have a SerializeWith annotation.
MODE-1515 - Added a separate AS7 module for each sequencer inside the AS7 distribution kit
MODE-1515 - Removed chances of possible negative value due to overflow
MODE-1515 - Extracted AS7 "common" module and fixed the dependencies between modules.

Extracting the common module did bring up a small issue in that i18n resources from other modules (e.g. main) could not be loaded. The reason what that the ClasspathLocalizationRepository always used its own CL to load the .properties file, which doesn't work with the AS7 classloading mechanism. The solution was to simplify the loading  and always use the class loader of the i18n class which we're trying to localize.
MODE-1515 - Fixed passing the environment when performing an engine.update. This fixes part of the problem described in https://issues.jboss.org/browse/MODE-1516
MODE-1515 - Updated classloading mechanism used for components

Since AS7 uses modules dedicated classloaders, it was necessary to update the way in which components (sequencers, extractors etc) are loaded. The solution was to move the classloader creation to the Environment (with the dedicated LocalEnvironment and RepsitoryService implementations)  and to use a new class loader implementation: DelegatingClassLoader. This implementation uses an inner list of class loader and delegates each operation to them. In the case of AS7, there is a delegate class loader which uses the ModuleLoader to find the classloader for each module.

The changes also contain an update to the common package: the component package and most of its unused classes have been removed. The classes which are still used have been moved to .util.
MODE-1515 - Added Arquillian test for the configured sequencers. In order for all the sequencers to be present in the repository configuration, a workaround with a TODO was added for MODE-1521
MODE-1526 - Added test case which indicates a problem with ISPN and Schematic entries
MODE-1521 Adde support for 'put-if-absent' behavior in the Schematic Editor/Changes functionality

Using the Editor framework to modify a document didn't always work correctly when used in a heavily
concurrent way, because when some of the 'put' operations (to use an empty document) were applied they'd
forcibly override any existing value created since the changes were recorded. Adding a 'put-if-absent'
operation makes the changes more correctly match the semantics.

All unit tests and integration tests succeed with these changes.
MODE-1521 Corrected JavaDoc

The JavaDoc was corrected to properly define parameters and to remove references to recently-removed classes.
MODE-1512 Close Hibernate Search when repository is shutdown

When the repository is shutdown, we're not closing the Hibernate Search SearchFactoryImplementor. This doesn't appear to remove the index's (native) write lock; will have to consult the Hibernate Search experts for assistance.
MODE-1526 Correct persistence functionality

The DocumentExternalizer was checking the number of bytes available for reading without blocking, and this seemed to always return 0 bytes. The DocumentExternalizer was then immediately returning without actually reading any of the content; obviously this was wrong. Now, with some minor changes to the BSON reader/writer, the DocumentExternalizer is merely always just reading the BSON document.

This appears to have fixed the persistence issue, and the recently-added unit test now runs (after some modifications). Note that we're still apparently having issues with the index (native) write locks being kept after shutdown; this will be worked under MODE-1512.
MODE-1526 - Added code to ignore the explicit index removing on Windows (because it doesn't work).

Also, cleaned up some tests and removed todos related to MODE-1521
MODE-1526 - Added the purge=false attribute to the local caches configuration which preserves the data between restarts.
However, this exposes the problem from MODE-1520. To work around this, we're repacking the ISPN main module and we should revert this at some point (MODE-1534)
MODE-1512 Corrected tests to show that the locks are being removed

Recent changes added a close mechanism to ensure that the Hibernate Search
SearchFactory is properly closed when the repository is closed. This mechanism
was refined a bit, and the tests were refactored to pull the test that
starts, uses, stops, and restarts the repository (by creating a new JcrRepository)
instance into a separate test class to reduce the number of repositories
that are used.

All unit and integration tests pass with these changes.
MODE-1536 Corrected use of System.nanoTime() for all platforms

Different platforms implement System.nanoTime() differently, and it's possible that computing
the difference between two subsequent calls to the method will be a negative number. Therefore,
changed all the places where we're using it to use the absolute value of the difference.
On most platforms, this won't result in any change, but on some Windows platforms this
fix should prevent computing negative durations.

All unit and integration tests pass.
MODE-1536 Added one more set of changes

Neglected to include this change in the previous commit
MODE-1538 Added ability to cancel queries

Added a Query.cancel() method that can be used to cancel currently running queries.
Note that because the Query.execute() method blocks, canceling a query must be done
via a separate thread. This does add some complexity to clients, but it provides
a very useful capability to cancel long-running (or perhaps runaway) queries.

All tests pass with these changes.
MODE-1507 - Added the webdav modules back to the build system and fixed the tests.
Also, removed a deprecated class and implemented a real integration test which uses a WebDav client to test the exposed functionality.
MODE-1507 - Updated the AS7 kit to include the WebDav war and also added an Arquillian integration test