bunch of reorganization to allow sane type class instances for a variety of types.
Theres some trickiness for supporting Data and Typeable for Shape and Nat on Pre and Post 7.8 ghc versions
reorganizing how the (Sparse/Dense)Layout instances are defined so that the sane instances for Eq, Show and friends are easy to write.
This is also to evade accidental orphan instance issues that might otherwise arise.