Convert to use YAML instead of json for legend files.

YAML can contain comments, and has much less bracket matching.