setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.

setAttributeNode() now performs a case-insensitive search for an existing attribute
and if found, retrieves the index of such an attribute. For setting the value we
call upon setAttributeInternal() to which we pass both the index as well as the name.
The name passed to this method is the same as the one passed to the setAttributeNode() API from the webpage and thus can be in any case.

However, setAttributeInternal() uses this name to get the corresponding existing node.
Since this retrieval is not case-insensitive, the existing node is not found and thus
the new value is not set on the existing node.
We should instead use the passed index and use that to retrieve the existing node.

Note that obtaining the attribute's value using getAttributeNode() would still
return the correct value, i.e. the new one.

Also, this now makes our behavior similar to that of FF and IE.

BUG= 279193, 282922
R= esprehn@chromium.org,eseidel@chromium.org,ojan@chromium.org

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157015

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

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