Fix bug where keys were not added to agent after CLI unlock

Wait for KeyAgent.addKey() to complete before completing
Vault.unlock().

In the CLI this was failing for commands which did not require
actually decrypting data using the agent as the app was exiting
after the vault had been unlocked but before the keys had actually
been added to the agent.