This adds Data.Bifoldable and Data.Bitraversable from the
bifunctors package to base, completing the migration started in D336.
This is fairly straightforward, although there were a suprising amount of
reinternal organization in base that was needed for this to happen:
- Data.Foldable, Data.Traversable, Data.Bifoldable, and Data.Bitraversable share some nonexported datatypes (e.g., StateL, StateR, Min, Max, etc.) to implement some instances. To avoid code duplication, I migrated this internal code to a new hidden module, Data.Functor.Utils (better naming suggestions welcome).
- Data.Traversable and Data.Bitraversable also make use of an identity newtype, so I modified them to use Data.Functor.Identity.Identity. This has a ripple effect on several other modules, since I had to move instances around in order to avoid dependency cycles.
Fixes Trac #10448.