Move self-closing tags logic back to compiler so it works with xml

[closes #1448][closes #1464]

Also makes invalid filter-name errors get reported with the correct line
numbers and correctly reports errors when we have no idea what line/file
the error is in.
Make sure all the examples get run as test cases
Merge pull request #1465 from visionmedia/self-closing-tags-in-xml

Move self-closing tags logic back to compiler so it works with xml