cleanup
refactor socket stuff into portalSocket.c (just used by s/w application) and sock_utils.c (used by both s/w app and bsim)