Use derived Typeable/Data when possible

GHC 7.7 now allows this. The removal of some explicit import lists in
this patch may cause trouble with older compilers, but it has been
tested against 7.6.1 and 7.7.