Fix/test pre key generation
Move crypto things to js/crypto.js
More wholesale conversion to promises
Refactor some low-level crypto things
Remove TODO.txt now that I found time to put in github issues.
Fix exception in options.js on first run

Fixes #22 Uncaught ReferenceError: getRandomBytes is not defined
options.js:41
Merge pull request #23 from liliakai/fix

Fix exception in options.js on first run
last(?) round of crypto.js AB-type-conversion changes, new tests
FINALLY report crypto, etc errors to console thanks to promises...
promises, type conversion errors
Generate and submit registrationId, fixes #25

If we're expecting to get registrationIds from others, it's only fair
that we also supply our own.