Explicitly switch to credentials cache when needed
This patchset adds a few kerberos related fixes. In particular:
- It makes sure the latest credential cache gets made the default credential cache if the cache it's replacing was the default
- It fixes a crasher