Improvements for xmleql

This adds some improvements for the xmleql test assertion. When passed in a
document, use the documentElement. Also improve error reporting as suggested
by @tschaub.
Merge pull request #689 from bartvde/xmleql4

Improvements for xmleql (r=@ahocevar)