Changed deriving of Functor, Foldable, Traversable to fix #7436. Added foldMap to derived Foldable instance.

The derived instances will no longer eta-expand the function. I.e. instead of
    fmap f (Foo a) = Foo (fmap (\x -> f x) a)
we now derive
    fmap f (Foo a) = Foo (fmap f a)

Some superflous lambdas are generated as a result. For example
    data X a = X (a,a)
    fmap f (X x) = (\y -> case y of (a,b) -> (f a, f b)) x
The optimizer should be able to simplify this code, as it is just beta reduction.

The derived Foldable instance now includes foldMap in addition to foldr.
Added note explaining the lambdas generated by functor deriving code, and how it compares to the old deriving code which used eta expansion.
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc