Cleanup code and docblock for DigestAuthenticate.
Merge pull request #3737 from ADmad/3.0-digest-auth

Cleanup code and docblock for DigestAuthenticate.