Add doctests for keys() and values() of the BTreeMap collection.

Update keys() and values() for BTreeMap based on @Gankro's comments.

Assign keys and values to variables before doing assertion.
auto merge of #19555 : jbranchaud/rust/add-doctests-for-key-values-of-btreemap, r=Gankro