Use GHC Generics to derive FromJSON instances

This ties the library to GHC 7.2 and above. Can be removed in the
future, if there is a good reason.
Move types into their own module

This also rmeoves the use of GHC Generics. The only easy way to use this
(I think...) to derive FromJSON types would be to move the types into separate
modules to prevernt record clashes.