Rewrite of the entire legend documentation, including tidy ups of code
and style to all things "legend".
Review actions.
Merge pull request #2442 from pelson/legend_tidy

Rewrite of the entire legend documentation, including tidy ups of code and style to all things "legend".