Port of InterProcessLock / Mutex classes from apache curator.  Also, avoid null deref in ProcessWatcher, fix serverAddrs randomization, and avoid problems with IPV6 addesses.

The WriteLock class implements locking with immediate success or immediate failure, but does not help if you want a client to "block" for a time until the lock becomes available.  Apache curator has very nice implementations of many recipes, including Mutexes.  I needed such a Mutex implementation, so I've done a rough port of the one from apache curator.  The curator implementation assumes a client wrapper from the curator library that I did not port, so instead, I've made the implementation depend on IZooKeeper... this is the primary difference.

Also in this pull request, some minor bug fixes including:
* avoiding a null deref in  ProcessWatcher
* fixing serverAddrs randomization
* avoid some issues with IPV6 in the name resolution step