rrid.py: improve API, manage tokens/privkeys/tokenids better