master: Handle unregistered chunkservers properly on shutdown

Master should not exit as long as structures concerning unregistered
chunkservers are not cleaned properly.

Change-Id: Ifb4121739ef715f8603fd7dff754cc40d7e24271