Support for DOM and other external tree models

The DOM4J object model is now recognized in the same way as DOM, JDOM, and XOM. The code has been lifted from the Orbeon OPS server (it was originally written as a modification of the JDOM support module in Saxon). A few minor bugs have been fixed. Thanks to Erik Bruchez for identifying this opportunity.