Enhanced XML applications API

Along with trying to make XML applications more readable and robust, this
API fixes the following limitions of the old one:
 - allows parsing of partially valid documents
 - unknown elements and attributes are kept in parsed documents
 - allows easy specification of element order
 - generation of partial XCAP updates can be easily added
 - updating of applications from xcap-diff can be easily added

darcs-hash:20090211165928-1e3d8-baff4f936d49b5b787ca8411beaa6bf47a69eff9