Moved the compare function out of the object.

JSLint told me to move 'use strict' into a function, so I did.
This gave me a place outside of XmlToHtmlComparator to put the
compare code, allowing a clean separation between project-specific
code and framework code.

Also refactored for shorter functions.
Also Added more comparisons for AMS