Nuke obsolete socket fncts

Remove several ni_socket functions that have been obsolete and unused for ages.
Remove ni_global.recv_max which wasn't used by anything except these functions