beam2/unix: move unix socket helpers to socket.go