Simplify stable_uasort to allow arithmetic and equal weights