Changes to the Credential API. Changed File-based store to use the Credential API. Added more test cases for Credential and Agent management.