Added the genericToJSON and genericParseJSON functions
This makes it easier to parameterize the generic JSON encoding/decoding
since users now don't need to import GHC.Generics
and so don't need to depend on ghc-prim.