Add equals and hashCode implementations to the Principal so that they can be used with the authentication cache.

Update the IdentityManager implementation to use the incomming Principal for the subject info whilst retaining the principal from the authentication process to be reported as the authenticated user.