Add extra validations to prevent Signature wrapping attacks
Add extra validations to prevent Signature wrapping attacks

There was a bug on the toolkit that made it vulnerable to a
Signature wrapping attacks in the specific scenario where
there was a Signature that referenced at the same time
2 elements (but past the scheme validator process since
1 of the element was inside the encrypted assertion.

On this commit we added 3 new validators in order to avoid
Signature wrapping attacks:
- Extra validations at the validate_signed_elements method to check that
  the ref URIs and IDs are unique and consistent.
- Validate the document (encrypted and decrypted version) against the scheme.
- Use at validate_signature method the same logic than in xpath_from_signed_assertion
  (adding the 'id' => doc.signed_element_id condition).

OurHealth/ruby-saml,zipnosis/ruby-saml,itrp/ruby-saml,10Kft/ruby-saml,ksinkar/ruby-saml,onelogin/ruby-saml,InviteEducation/ruby-saml,jobscore/ruby-saml