socket-util: Move sock_errno() to socket-util.