KEYS: Make the session and process keyrings per-thread