Cleanup on the "email_chosen" state and reduce duplication of code.

* Code that decided how to handle transition states and clear certs was sprinkled throughout the code, making it difficult to maintain.
* Move cert invalidation that happened in state.js into user.js.
* Rename user.js->checkEmailIssuer to checkForInvalidCerts
* Simplify checkForInvalidCerts
* Add more unit tests.