[web-animations] Rework the algorithm for cancelling a player

Original change by Brian Birtles <birtles@gmail.com>
https://dvcs.w3.org/hg/FXTF/rev/0e4f6b0336af