Use svg casting function instead of static_cast<>

We can use toSVGPathElement() and toSVGPolyElement() instead of static_cast<>.
This patch removes unneeded local variables as well.

BUG=N/A

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

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