NEXUS-6742: NEXUS-6791: exit process if Nexus is already running

https://issues.sonatype.org/browse/NEXUS-6742
https://issues.sonatype.org/browse/NEXUS-6791
http://bamboo.s/browse/NX-OSSF237-1 :white_check_mark: 

This PR provides an implementation of Karaf's system lock that uses the Nexus lock file approach to detect whether another Nexus instance is already running and if so exit the current process. It uses a copy of the LockFile class from nexus-bootstrap, slimmed down further so it works in the more restricted Karaf launcher environment (where even logging may not have been fully initialised yet).

Note: it locks the base directory rather than the work directory, because we haven't processed any application configuration at this point. It also uses "lock" as the lock-file name to match Karaf's standard behaviour - but if people prefer then we can rename this to "nexus.lock".

PS. the alternative solution would be to extend Karaf's SimpleFileLock and make it exit when it failed to lock, which would avoid the need for the LockFile class. But SimpleFileLock doesn't record the owning process in the lock file, which is useful when debugging.
Karaf only adds jars starting with "karaf..." to the initial classpath used to launch the application. Without this change the jar isn't on the classpath, sp Karaf fails to find the lock, and fails to start.