Instance discovery and authority validation fixes.
Removed redundant code.
Expand test coverage
Merge pull request #21 from MSOpenTech/AuthorityValidation

Instance discovery and authority canonicalization updates