Add TH and SCOPE where appropriate

This is required so DOM parsers can correctly infer which cells are
headings and which are content.

The TBODY in the table is implicit, which is why we only need to specify
THEAD wrappers.