Introduce the IdStore abstraction, which allows for pluggable implementations and provides a simple entry point.