osd: fix several leaks

With these 3 patches we are passing the valgrind leak checks again with the
rados api test workunit.