Backport GetClientAuthId native to 1.6-dev

@asherkin 

As we previously discussed, this backports the spirit of the GetClientAuthId native from master. It's implemented differently, not as clean or robust as upstream, but requiring far less Internal changes. The user-facing behavior should be identical.