Focus on the next input element at various times.

A really trivial fix which saves users more time than you'd belive.
Focus on the user name box at login, the first first_name box when
registering users (or the last one if you've just added a row), or
the new_password field when activating.

Change-Id: I37f22cf67996c5d4cf089dceaf0a2295adfbbee6
Allow specifying how long an 'end' message shows for.

This is better than having callers that want this need to do their
own timeouts.

Change-Id: I3a68302fe681ff9f7335e623607ec4c4c8dae9b7
When 'end' notifying, only hide if the text is unchanged.

This avoids the user managing to be really quick about starting
another action and then losing their message because of the end of
the previous one.

Change-Id: Ib6b85a4909a6b1d9a6b84718a59aea8380eb10bf
Rename variable for clarity.

Change-Id: I6bdb985feac7ad368981e497191d3c99de518c40
Move registration failure handling next to success handling.

This gets both bits of functionality in the same place, making it
much clearer to see how they work. No functionality changes yet,
but this already makes it easy to spot the errors in this code.
The send_registration_hash method is now back to being a utility,
more useful now that it also wraps a failure callback too.

Change-Id: Ic9014c4af7581fe8646a5ccb76d8a5870b21bec9
Fix #2071: Add a footer about the emails being automated.

This should reduce the number of people replying to the automated
system, and thus the load on the forwarded recipient's inbox.

Change-Id: I770c8877fc2b7a5e4934797c5f126d8a02c4d86e
Fix registration submission in case of partial failure.

Previously, if all of the submitted users worked, but some of the
rows had failed at the javascript check, then when the submissions
returned, the page was closed anyway because the pre-failures were
overlooked. This commit re-works the success criteria by adding a
second count to the registrations collection, which indicates the
total number of rows being worked on. This is then used to work out
if the page worked entirely.

To avoid confusing the user with submissions that worked subsequently
failing, these are now removed as soon as they return from the server,
leaving only those that failed (from either step).

Change-Id: I3d4a5d839d3a88f80eeca613d9be1418a0f1f6f1
Disable registration rows being submitted.

This ensures that the user can't edit something which then either
fails or is removed, both of which have the potential for confusion.
These are re-enabled if they fail (or removed on success).

Change-Id: I7c5dd33fe718f1798e3a5960e8b4acad203155dd
Improve registrataion by not removing a partially failed form.

This merges branch 'fix-registration', which includes a number of
registration related tidyups, most significantly not hiding the form
when there are some rows that failed.