Correctly handle moving class and id attribtues between documents in different compatModes

When moving between a document in standards mode and a document in quirks mode the
idForStyleResolution and the className stored in ElementData needs to be updated
to reflect the change in case sensitivity.

BUG=257221
R=abarth@chromium.org,ojan@chromium.org,arv@chromium.org

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

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