Move remaining XPath calls in util to xpath module

The purpose of this commit is two-fold. First, consolidate all the
XPath related code in our xpath module. Second, having done this
we are free to remove the dependency on the xpath module from our
util module. This will allow us to use util as the one definitive
source of the jquery object. Without this, xpath could not be changed
to get jquery from util because it would result in circular import.