Multi-group keychain fix

Few fixes:
1. Separate keychain helper class
2. Change the logic with switching to another keychain group to not transfer the cache items
3. When conflicting cache items present in the keychain, pick the one with the latest modified date and do not delete anything.
4. Make the logging more robust to avoid throwing if the information message is NULL.