Fix race condition in cache entry unref

If an entry were unref'd while the item was being marked as floating by the
pruner thread, there would be a double free.  Make sure that doesn't happen
by atomically incrementing the reference of each entry before marking it as
floating and atomically decrementing and verifying if it's zero afterwards
-- and only destorying the item if this condition holds.

Closes #46.