Fixed seg fault described in bug 9356 by adding reference counting on an...

Fix for the issue reported in http://tracker.ceph.com/issues/9356
This definitely fixes an existing race condition involved in issue 9356.
But as I could not manage to exercise this race condition in my environment, I cannot 100% guarantee that it completely fixes issue 9356