Add ability to override the sort direction per header

This patch enables a developer to change the sorting behaviour per header rather than having a single direction for all headers.