Improved speed of `each`

This was done by writing it directly in terms of `Data.Foldable.foldr`, which
triggers list fusion better.