Add a "Legend" button when the topmost layer has a legend.

Clicking the button opens the legend URL in a separate tab.

This changes the Data and Map buttons to text instead of images (Fixes #318).
This also implements the stopgap legend support in #124.