More flexibility with TEIs

Allows the `PreProcessor` to directly go to a `TEI` node in a document that wraps it in something else (like a CTS getPassage request).

This uncovered a few inconsistencies in nokogiri behaviour in MRI and jruby, which has been reported to the nokogiri-talk list (link to follow, the post is currently waiting for its release).