shutdown and disconnect properly, by setting a flag on those events

and checking for it each tick. this means we can delete on the same
thread, etc. should be working great now, and without crashes (one hopes)

doc things a bit better too