Better setup for XPath predicates.
Better setup for XPath predicates.

This allows filtering of nodes by indexes (e.g. using last() or a literal
number) and uses the correct index range (1 to N in XPath). The function
position() is not yet supported as this requires access to the current node,
which isn't passed down the call stack just yet.

dfockler/oga,ttasanen/oga,ttasanen/oga,ttasanen/oga,altmetric/oga,ttasanen/oga,YorickPeterse/oga,jeffreybaird/oga,YorickPeterse/oga,dfockler/oga,altmetric/oga,jeffreybaird/oga,jeffreybaird/oga,altmetric/oga,altmetric/oga,dfockler/oga,dfockler/oga,jeffreybaird/oga,dfockler/oga,ttasanen/oga,YorickPeterse/oga,altmetric/oga,YorickPeterse/oga,jeffreybaird/oga,YorickPeterse/oga