Allow XPath to resolve functions as well

We solve the callback problem with functions by returning
exec_xpath_function as the C callback when there is a registered Go
handler; libxml2 puts the function name in the context before actually
invoking the callback, so we can do our actual dispatch then.