Fix for error states on logout/login

This fixes an issue where logging in, then logging out and opening
the login form will reveal a form with error messages. This is due
to the execution order of events post login.

https://github.com/hypothesis/h/pull/1275#issuecomment-51777983
Update the formValidate tests

The $setViewValue field wasn't working.
Simplify form error input handling

The form-input class now has the directive responsible for setting
the error classes. It watches its scope and sets the errors only
if the model is defined or pristine. This guard keeps the error class
from being set until validation passes (when the model becomes defined)
and keeps it from being cleared until the pristine state is reset.

The form-validate directive is now just a controller for form-input to
register with. It sets all fields to dirty and forces a render on
submit.

These mechanisms are better all around than trying to listen for a the
model to be undefined and setting pristine automatically. The model is
undefined whenever validation is failing. There are times when the from
should maybe be cleared but still show errors. Now, it is left up to
other code to set pristine if the form should be reset.
Fix the form validation tests
Ensure match directive digests in DOM callback

Otherwise, this only clears at the appropriate time when triggered
by a scope change, not when triggered by keyup.
Fix the match tests
Merge pull request #1405 from hypothesis/form-input-directive

Simplify form error input handling
Merge pull request #1394 from hypothesis/account-management-form

Fix for error states on login/logout/login