When parsing XML, don't assume the document structure is fixed

The old XML parsing code assumed a specific document structure, and
located elements by their position in the document rather than by their
name.  This made the parser very fragile.

For example, when CAS switched from OpenSAML 1.1 to OpenSAML 2.x (per
CAS-951 in CAS 3.5.1), some minor changes in the XML document structure
of SAML responses were introduced, which broke the old XML parsing code.

This new parsing code searches for elements by name, making it more
robust.