[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
[FastTextAutosizer] Strip whitespace when computing textLength

This patch switches FastTextAutosizer::textLength to use the text length
without whitespace which more closely matches renderedTextLength().
For example:
<td>[200 whitespace characters]hello</td>

Before this patch this td would have 205 characters and a total
textLength of (205*specifiedFontSize). After this patch this td has 5
characters for a total textLength of (5*specifiedFontSize).

We now pass 1 additional test (clusters-insufficient-text.html) which
covered the above <td> case.

BUG=302005
NOTRY=true

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

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