Rewrite replace_all.
auto merge of #1164 : Ms2ger/servo/remove_all, r=jdm