Allow custom comparators for HeaderCell

This is a pull request that fixes #219. I wrote some tests for it and it seems to be working fine. Did you want to make the `comparator` and `value` functions work with the name resolver? That's what I thought I understood in the #219 issue discussion.