Add drain-before-shutdown behavior (fixes #24)

This changes the PushManager's shutdown behavior to drain the internal retry queue before gracefully closing connections.

~~This is the same as #50, but now with less crazy. It also depends on #51 (which depends on #47).~~

This is the same as #52, but now against the `threadless_connections` branch.