implement reference counted storage
Merge pull request #1 from rogpeppe/with-refcounts

store: implement reference counted storage