Rework using `foldl`

After some feedback on the `pipes` mailing-list, the implementation was
reworked to use `Fold`s from the `foldl` library, and a little utility
function (similar to the prior `hashInternal`) to run such `Fold` over a
`Producer`, whilst still passing its values first.

See: https://groups.google.com/forum/#!topic/haskell-pipes/wxxHJSZTmrI