Inline implementation of GToJSON
Inline implementation of GToJSON

Generic implementation should use inlining when possible
in order to eliminate Generic sum/product combinators
in final generated code.

The simplifications can actually lead to smaller code and faster
compilation.

Compilation time (GHC 8.4):
- G/BigProduct.hs is 25% faster
- G/BigRecord.hs is 2x faster

Runtime performance:
- BigRecord/toJSON/generic is more than 2x faster
  (same as BigRecord/toJSON/th)
- BigProduct/encode/generic is more than 2x faster
  (still almost 2x slower than BigProduct/encode/th

The same approach dose not improve GFromJSON due to the presence
of unsaturated applications.

dmjio/aeson