Clean up the XML parsing code and fix SAML parsing in CAS>=3.5.1

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.

This commit obsoletes pull request #46.

Unit tests are included for both old-style and new-style SAML payloads.