Index view table headers fix

Tables in generated index views currently have no `thead` section and the table header `tr` and `th` elements are instead being placed within `tbody`. This PR modifies the index template to place the header row and cells within `thead` tags. `tbody` is still generated implicitly for the other table rows correctly.