Fix certificate exchange and add invitation token support

This pull request adds initial support for "invitations" - one personal zone hub issuing an invitation that anyone else can click on to connect the two personal zones.

These changes are linked closely to PZH Web Server changes too.

On this PR, I just add support for persistent tokens, generated and stored on the web server for each user. There are also some improvements in stability.

Jira issue: WP-852