Add windowFlatMapWithState function to DistributedUtil.

Reimplement pileup flatmap functions using windowFlatMapWithState, which drops a bunch of redundant code. Remove original window flatmap function.
Turns out classtag is necessary for T but not S here. I'll push a fix for that.

Yeah, the state variable is any state from locus to locus. It's used for example in pilupFlatMap to keep track of the previous pileup at each locus.