Add a shutdown method which, among other things, deregisters client sockets
from the server. This should make it easier to implement server-side
disconnections.