Rewrite Document::SetTitle to use a match.
auto merge of #1740 : Ms2ger/servo/set-title-match, r=jdm