auto: work on container iteration

This adds a BaseIter impl to PriorityQueue, TreeMap and SmallIntMap, and introduces a ReverseIter trait + implementations for TreeMap, TreeSet and SmallIntMap.