Refactor and simplify keyring implementation

- Add basic KeyRing class which accepts any identifier
- Set up constants for special keyring identifiers