Indexed variants of scanning and aggregating

Based on and resolves #1254.

I didn't implement `-aggregateWithStartFactory:reduceWithIndex:` because `-aggregateWithStartFactory:reduce:` is being deprecated in 3.0.