Add anti-CSRF support

This commit goes with the Web Server anti-CSRF patch.

It primarily tidies up some code and modifies a few interfaces.

Jira issue: WP-781

Change PZH identifier to nickname, not OpenID Email address

This commit must go with similar commits to the PZH Web Server

Jira issue: WP-959

Fix user identifiers on the PZH to have format 'user@pzh.webinos.org'

This is a fix corresponding to the PZH Web Server changes with the
same Jira issue.

Jira issue: WP-959

Fix error on inter-PZH certificate exchange

The requests for external certificates were crashing for two reasons:
lack of a CSRF token, and poor user validation.  This is the fix, plus
a related patch on the PZH Web Server.

Config has also been reset to 443/80

Jira issue: WP-959

Bug fixes during certificate exchange for inter-PZH user accounts

Jira issue: WP-959

Fixes for inter-zone certificate exchange: use email not nickname

Jira issue: WP-959

Add the external nickname during certificate exchange

Not used for authentication, but for getting the right entry in
'untrustedList'

Jira issue: WP-959

Another bug fix for approving inter-zone cert exchange.

The internal and external processes used nickname and
nickname@domain formats, this fixes that down.

Jira issue: WP-959

Fix for port identification: ports are strings not numbers.

Jira issue: WP-959

Remove logging and debug messages

Jira issue: WP-959

Build serviceCache from available API modules

serviceCache will be build from the modules available in node_modules/

Jira-issue: WP-10002

pass path to node_modules to module loading funcs

fixes loading api modules that are installed with npm link.

Jira-issue: WP-1018

Fixes to enrolment and removal of QR code module.

Enrolment was needlessly complicated.  The authentication code has
been removed, and the session handling improved to provide some
feedback to the user.  Message names have been fixed.

Jira issue: WP-959
Fix ports to refer to serverPort not web server port

Jira issue: WP-959
Merge pull request #8 from jplyle/add-nicknames-for-pzh-users

Add nicknames for pzh users