Adding hashCode and equals methods to various classes, to aid in
generating a hashcode for a particular query, so query results can be
cached for returning pages.  Also added another utility method to
UrlConstructor.