os/bluestore: pin onodes as they are added to the cache
When onodes are added to the cache, they may have more than one
reference already. Due to the implicit nature of boost::intrusive, in
the common case of creating a new Onode, they have 3 references at
this point.
Since they haven't been added to the cache yet, Onode::get() could not
pin them when they went from 1->2 references. Instead, take care of it
when they do get added to the cache. The pinning in get() is still
needed in case they get unpinned and then referenced again while still
cached.
This lack of pinning meant that newly created onodes were immediately
removed from the cache, since the last step of adding a new onode is
trimming the cache. In tests that read the object just after queueing
a write to it, the read got ENOENT, when it should have read the onode
from cache.