Little fixes in peer network.
(1) Use of unsigned port number
(2) Fix of copy pasta error in window isLocal logic
(3) On outgoing connection print endpoint instead of peer.endpoint
 (this fixes 0.0.0.0 appearing in log on OSX as not fully initialised)
Fix up IP port number to be ushort where it is used instead of short.
Change use of raw new to std::unique_ptr and fix a shutdown race condition discovered using atomics.