Add a sort parameter to the TOC macro

As requested by @giffmex