Now that SelectServer executes callbacks during shutdown, fix some tests.

Introduce a DrainCallbacks method to run all pending callbacks.I'm not sure
this is a good idea but it's the best I could come up with.