pcs: Rewrite socket binding code in MSP

Originally the code simply looked for a port in range 5001 to
5100. @MalcolmCurrie has recently been having problems with
ORAC-DR not being able to run up because it can't find a working
port.

A quick search on the internet suggested that we were doing it
wrong. The proper solution is to request port 0, let the OS
assign a free port to you, and then call getsockname() after
the listen() call to determine what port number you were
given. It didn't seem like much work so I made the change
to do that. Pretty straightforward and now ORAC-DR and
ICL still work for me but I'm getting port numbers
around 54000 instead.