Adds simple scan function.

Adds a prefix-scan function that can be applied across the whole RDD (as opposed to a segmented scan).