Insert rules in SelectorMap manually to avoid unnecessary allocation.
Eliminate use of `map` by using a for loop.
Avoid unnecessary cloning of Rule in SelectorMap code.

Do this by receiving a borrowed pointer in get_id_name(), etc..
Also, move the received argument in insert() method (instead of cloning it).
Make Rule have Arc<Selector> to eliminate allocation while cloning.
Use push instead of referring to the last element.
auto merge of #1299 : pradeep90/servo/rule-hash-optimize, r=pcwalton

Issue #1274

Also:
+ Reduce number of clones of Rule
+ Make Rule have Arc<Selector>
Use 'match' instead of 'if'.
Enable to update id attribute for Document.getElementById(). (#740)
Use 'DOMString' to define the type insteand of '~str'.

At now, 'DOMString' is equal to '~str'.
https://github.com/mozilla/servo/blob/155befe10dc56cfb2dfbf0cca7b652293dba9753/src/components/script/dom/bindings/utils.rs#L119
auto merge of #1302 : saneyuki/servo/getid, r=jdm

#740