kvstore: rewrite KeyCollection, KeyQueue and their Iterators