Adding <thead> to tables

Wrap thead around 1st row, when 1st cell at 1st row is tableheader.

Implements the feature request FS#1764