Move setting the click handler for use_pgp into the JS code.

Signed-off-by: Daira Hopwood <daira@leastauthority.com>
Refactor register_callbacks() into initialize_page() and register_callbacks($form).

Signed-off-by: Daira Hopwood <daira@leastauthority.com>
Update stripe JavaScript tests.

Signed-off-by: Daira Hopwood <daira@leastauthority.com>
Set state of #use_pgp explicitly during page init
checkpoint
Extensive refactor of the test suite.

The unittests now:

(1) Use a single defintion of the spy used for all invocation of $():
     jquery$spy
(2) Declare all return types in the defining scope of that spy
(3) Redefines return types to test different units, in the context
of those unittests
(4) Attempts to set aside external components, and purge test state
only once for each variable.  Mostly this is done by defining an
enclosing "describe" where ubiquitous variables are intialized and
destroyed in the "global" beforeEach and afterEach functions.
(5) Have proper 4 space, no-tab, no trailing-whitespace formatting.