Fix sorting by asset custom fields

Assets rely on the core _OrderByCF function to implement the relevant
joins and ORDER BY clauses; _OrderByCF was refactored for this purpose.
Unfortunately, bestpractical/rt@63ca3d85 (in 4.2.0 and later) changed
the method to take three arguments, not two.  An undefined CF was thus
passed into the ordering function, leading to nonsensical joins,
sometimes empty results, and apparently-random row ordering.

Update the calling convention to pass the three arguments that the core
method expects.
Allow sorting by role groups