Fix crash in which elementData() might be null.

The issue is that an SVG animation may animate the class attribute. SVG tracks attributes, including class, internally. But it still needs to track style recalc dependencies on class, so it hooks into the class change machinery in Element. In order to do so, however, elementData() mus be non-null, which requires calling invalidateSVGElement() while mutating class in the SVG code.

BUG=345178

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

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