Add update_scan_order

augment_prob: embed r + c and coeff_idx info with nonzero probabilities.
When sorting the nonzero probabilities, if there is a tie, the coefficient
with smaller r + c will be scanned first

sort_prob: quick sort

dfs_scan: topological sort

update_sort_order: apply quick sort on nonzero probabilities to obtain
a sort order

update_scan_order: apply topological sort on the nonzero
probabilities sorting order to guarantee each to-be-scanned
coefficient's upper and left coefficient will be scanned before the
to-be-scanned coefficient.

Change-Id: I719b24dc704e9652a7665af93816bacea7078fb0
4 files changed