Added order option to terms table

Terms can now be sorted by count, term, reverse_count or reverse_term. Closes #288