Move attributes-related functions onto JS<Element>.
auto merge of #1913 : Ms2ger/servo/attributes, r=jdm