Fixes #6949/BZ970600: restore sorting on task status.

The functionality for sorting on task status was removed
with a1de666c5722df480639ee28a38b9739763c5428 and never
ported over to the v2 API.  This commit adds the sorting
back into the v2 API controller.

http://projects.theforeman.org/issues/6949
https://bugzilla.redhat.com/show_bug.cgi?id=970600

Note that this PR is dependent on #4540 being merged.
What does this controller actually return now a days? A lot of tasks have been ported over to Dynflow and thus would not be returned here. The bug mentions syncs and promotions, however, those are all Dynflow'd as far as I know and thus not generating TaskStatus objects anymore.