Format buildHTML groupType definitions in preparation for adding types. (#1206)
Format buildHTML groupType definitions in preparation for adding types. (#1206)

* Format buildHTML groupType definitions in preparation for adding types.

1) Collapse groupType definitions (a bunch of functions all of the same type
   defined on the groupType object) into a single object in preparation for
   putting types only on the base object.
2) Do minor reformatting to account for the +4 indent above which pushes some
   lines past 80 characters.
3) Do other minor formatting changes for readability, taking advantage of ES6.

* Review fixes.

Khan/KaTeX,xymostech/KaTeX,xymostech/KaTeX,xymostech/KaTeX,xymostech/KaTeX,xymostech/KaTeX,Khan/KaTeX,Khan/KaTeX