Apply hamcrest

Responded to some of Alex's comments on tests in DOMComparer and UrlUtils. Needs to be mvn tested (@gnarph or @jordenh please).