[SVG] Fix various relative length tracking issues.

The SVGElement relative length tracking code is barely exercised at the
moment (we only check whether the set of relative-length childred is
non-empty, in hasRelativeLengths).

But the upcoming out-of-order resource layout patch relies on traversing
the relative length graph for invalidation, so we need to harden the code:

* removedFrom() needs to call updateRelativeLengthsInformation() on the
  rootParent node, otherwise the notifcation is not propagated (the
  current node is no longer in document) and we leave dangling references
  behind.
* when bubbling updateRelativeLengthsInformation() up to the parent node,
  we should re-evaluate hasRelativeLengths (otherwise we might be
  incorrectly clearing the flag for the whole subtree, not just one child).
* there's no reason for updateRelativeLengthsInformation() to have a
  recursive implementation.
* when clearing the flag (hasRelativeLengths == false) we can avoid a
  double hashset lookup.
* when the relative length state of a node is not changing, we can stop
  propagating the notification (e.g., if a node has 3 relative-length
  children and one of them clears its flag, the node still has relative-
  length children left and there is not reason to notify its ancestors).

Testing: the added ASSERTs + existing tests provide ample coverage.

R=pdr@chromium.org,schenney@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24657002

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