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 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.