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-3 :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.