Convert dojo/query tests from doh to intern

This commit converts the doh tests into unit tests. It merges the divergences
in the standard and quirks mode tests, and flags those tests which are
specific to quirks mode in case we want to reenable these tests later.