The current algorithm special cases conflicting proofs using the same master key, so that it is possible to update a proof with a lower amount by increasing the sequence number.
But this comparator is incomplete: if 2 conflicting proofs with the same sequence number are submitted, the last arrived one is rejected. This comparaison exhibit a weird behavior: it is possible to get isConflictingProofPreferred(a, b) == isConflictingProofPreferred(b, a). For example, this prevents from using this algo for sorting.
This diff changes the behavior so that identical sequence are compared by the other parameters, i.e. amount, then stake count, then id. This fixes the above issue, while maintaining the possibility for a user to update a proof with a lower stake amount as long as he owns the master key.
As a consequence the unit test can be simplified in a single case to avoid duplication.
Ref T1854.