Improve the reliability and accuracy of SVG getTotalLength

The existing code for SVG path.getTotalLength had two problems when
subdividing curves to estimate length. The subdivision terminated when
the straight-line vs curved length was within a fixed limit, regardless
of the scale of the curve. The termination condition for infinite loops
also failed to stop on infinite loops.

This patch fixes both issues. The subdivision threshold now accounts for
the magnitude of the values, so that we give more resolution on very small
curves and less on very large curves. This is consistent with the actual
precision we have in floating point numbers. The infinite loop termination
tracks and examines the total number of subdivisions thus far, terminating
after 20 (which is more than enough - most curves do no more than 10
subdivisions).

We also remove two unused variables and a FIXME that makes little sense and that we won't ever fix.

R=fmalita@chromium.org, pdr@chromium.org, fs@opera.com
BUG=349873

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

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