Helper functions to evaluate compiled XPath expressions

Reduces code size in libxslt/transform.c and makes the code more
readable.
Set namespaces before evaluating xsl:number

Fixes bug #712173.