Clean up Quaternion along similar lines as Complex.

This commit prevents Quaternion from storing type class
instances. It is inspired by (and closely mirrors) the work
Tom did on Complex.