Move use of QueryProperties until after the callback can modify them

Otherwise, the constructed link will not contain any changes that the
callback made to the sort order or query.
Secondarily order by id descending, as Priority is often unset

As Priority defaults to all being the same value, it falls to the
database as to how to sort the remaining tickets.  At best, such as on
MySQL, this is ascending by id (which is fairly useless) -- and at worst
it is pseudo-random (on PostgreSQL).

Add a secondary sort by id, descending, which will tend to show more
recent tickets in the limited set of rows.
Merge remote-tracking branch 'origin/4.2/user-ticketlist' into 4.2-trunk