Little fixes

Fixes for:

    (1) Use of signed short port number - changed to ushort
    (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 it wasn't fully initialised)
    (4) Fix reappearance of struct UPnP when it is declared a class