Ensure elementData is valid in classAttributeChanged.

This patch is a merge of http://trac.webkit.org/changeset/153835 by
Rob Buis.

This patch fixes a null pointer crash that was caused by elementData()
not being valid when changing the class attribute. This situation can
occur if no attributes have been processed before classAttributeChanged
is called.

BUG=

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

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