refs #3813 another data table improvement: refactor data table header to a separate template

 * removes code duplication (we already had a minor inconsistent bug fix - shame on us!)
 * show the sorted column and report documentation after using the search box

@Stefan: the issues I reported are fixed now

@Everyone: this is turning into a general data table improvement ticket