Make Socks5Proxy try other ports if 7777 is already in use

by setting the default value to '-7777' (negative values mean that the
next port number will be tried if the current one is in use).
Throw IAE if invalid port number is given for Socks5Proxy