add testing code for keyring operations.
move e2e encryption code to freedom module, and uses freedom storage to mock HTML5 local storage.