smallint{map,set}: replace iterators with DoubleEndedIterator

Also changed the tests to iterate over sparse maps/sets.
auto merge of #7921 : bytewiseand/rust/smallint-iter, r=huonw

Made the `iter` and `mut_iter` methods on SmallIntMap and SmallIntSet return double-ended-iterators. These iterators now implement `size_hint`.

Also the iterator tests only tested dense maps/sets, which aren't very useful. So they were changed to iterate over sparse maps/sets.

Fixes #7721