Fix #148 leaving domain sockets open

In order to make sure the domain socket closes, we need to close() the
socket server itself, which requires paying attention to its creation
and