[SVG] Invalidate resource dependents at mutation time.

We are currently invalidating resource clients during resource container
layout (RenderSVGResourceContainer::layout -> removeAllClientsFromCache).

This is a problem even after r158480, because dynamic updates may
trigger the layout of a contained subtree, which in turn can mark other
parts of the render tree for layout. This is obviously a problem if the
layout process has progressed past the nodes being marked dirty: they
will be left as such at the end of the tree-wide layout.

For example:

<rect ... filter="url(#f1)"/>
<filter id="f1">...</filter>
...
f1.setFilterRes(100, 100);

If the filterRes setter executes after the document has been laid out,
it will mark the filter (and only the filter) for layout. Then, during
layout, the filter tags its clients for layout - but we've already
passed the rect, so it is left dirty.

The solution is to stop marking renderes for layout *during layout*, and
instead perform the invalidation when the actual trigger occurs: in
svgAttributeChange().

Most SVG DOM classes already call
markForLayoutAndParentResourceInvalidation() in their svgAttributeChange()
implementation. This CL updates the SVG resource container DOM classes
to invalidate their renderer's cache at svgAttributeChange() time
(instead of just marking marking them for layout), using a helper
RenderSVGResourceContainer method: invalidateCacheAndMarkForLayout().
Essentially, all resource container DOM classes must now call this new
method on mutation instead of calling renderer()->setNeedsLayout().

The CL also extends SVGResources::layoutIfNeeded() to handle fill,
stroke and linked resources: they too can introduce layout
dependencies.

BUG=311548
R=pdr@chromium.org,schenney@chromium.org,inferno@chromium.org

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

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