Optimize player sorting.

* Sort by sequence number per spec.
* Don't require a stable sort.
* Track and invalidate the sorted state.
Merge pull request #359 from dstockwell/sort-players

Optimize player sorting.