Generic Monoid type class and default definitions

This developed from an email in Haskell Café:
http://www.haskell.org/pipermail/haskell-cafe/2012-December/105433.html