Optimize player sorting.

* Sort by sequence number per spec.
* Don't require a stable sort.
* Track and invalidate the sorted state.