[SVG] Apply animations in sorted order based on begin time and document order

Sorting the animations before applying based on begin time and document order as per the spec.
Otherwise it may lead to confusing behavior.

This change is made to fix flakiness for svg/animations/discard-check-removal-order.html

R=pdr@chromium.org, schenney@chromium.org, dschulze@chromium.org, fmalita@chromium.org, rob.buis@samsung.com
BUG=333772

Review URL: https://codereview.chromium.org/137443012

git-svn-id: svn://svn.chromium.org/blink/trunk@165881 bbb929c8-8fbe-4397-9dbb-9b2b20218538