agent: move keyring initialization out of agent, add -init option to keys command