Create a pre element in Document-getElementsByTagName.html dynamically.

This will make it easier to generalize the test to Elements.
Move the body of Document-getElementsByTagName.html into a helper file.
Make test_getElementsByTagName() more generic.
Add a test for Element#getElementsByTagName.
Merge pull request #1423 from Ms2ger/gEBTN

Add a test for Element#getElementsByTagName.