script: Pass the correct parent node to pre_insert in insertBefore

Closes #1572.
Add a test file for insertBefore
tests: Add missing finish() and a title in insertBefore content test
auto merge of #1621 : abustany/servo/fix-insert-before, r=Ms2ger

Closes issue #1572