SVG: Avoid adding element references on nested <use> on external document.

This has caused leak in oilpan builds.

r176803 moved element references management from per-Document ElementDependenciesMap to SVGElementRareData. This change allowed cross document SVGElement references.

In oilpan builds, these element references are made strong references. Normally, the strong reference cycles can be collected by oilpan-gc, but currently the external document is held via Persistent, so oilpan GC fails to collect the objects. The complete diagram of this reference cycle is here: https://docs.google.com/presentation/d/1U07XLSvNYa22Qfrgb0blojBraWRS235oNwxSkWecUxI/edit?usp=sharing

This patch avoids the situation by not adding element references when the target document is held by ResourcePtr. This should be safe, as the external document cannot by modified in any way. Also this reference was not present before r176803.

TEST=svg/batik/paints/gradientLimit.svg w/ --enable-leak-detection and ENABLE(OILPAN)
BUG=None

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

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