Fixed shutdown to completely stop and close IOLoop.
Merge remote-tracking branch 'upstream/dev' into testing