Implement histogram on a table key

Closes #9

Also remove table header sorting, it conflicts now with the histogram
link. Issue #45