Add check for non-Text children for document.title.(fixes #1742)
auto merge of #1771 : lpy/servo/issue1742, r=Ms2ger

see #1742