Protection against CSRF attacks on the PZH Web Server

This pull request (documented in the commits) adds support to protect the PZH
against a number of online threats.

Most significantly, the PZH was vulnerable to CSRF attacks.  Now it should be a bit better.

This involved an enormous amount of fiddling and refactoring.

http://jira.webinos.org/browse/WP-731
Jira issue: WP-731