osd shutdown cleanup

#1857

Cleanup for osd shutdown and a few misc leak cleanups.

Not tested on teuthology, waiting for build.