Fix some deprecated warnings for to_owned()
auto merge of #2617 : Manishearth/servo/string-warn, r=Ms2ger