Have coverage / coloring use a hook

Summary: This makes things more modular. In particular, I plan to get
coverage to collect more data (that coloring doesn't require) in order
to see if we can get a better metric. This refactor paves the way for
that.

Reviewed By: @elgenie

Differential Revision: D1758648

Signature: t1:1758648:1419989541:989ef9f7846df9df495fe53791371264669d9ddb
Disallow trailing comma in used trait list

Reviewed By: @elgenie

Differential Revision: D1760716