Add optional reverse argument to sortBy

I have often wished to be able to reuse the same iterator, but reverse the order of the sort, when implementing filter-type controls.

This functionality has been already proposed (#910) but with a different API. I hope this one feels more idiomatic.