Add shutdown ability to wire_io

This is needed to cleanly exit by closing all file handles and having
nothing else to monitor for fd input.