Add ref counting to which leveldb shards are open so they can be closed ...

...after references released