Replace most ~"string"s with "string".to_owned().
Reorder some comparisons to avoid allocating strings for them.
Call find_equiv to avoid allocation strings.
auto merge of #2312 : Ms2ger/servo/owned-strings, r=SimonSapin