Add legend to comparison page.
Merge pull request #338 from MastodonC/feature/legend-for-comparison

Add legend to comparison page.
Improvements to calculated fields.

- Calculate last x months from the last timestamp not from today's date.
- Refresh ES after each calculation
- Better parsing of summary stats.
Merge pull request #346 from MastodonC/feature/improvements-to-calc-fields

Improvements to calculated fields.
New programme/project manager authn logic

With tests.
WIP
Remove unneeded functions from k.h.security
Project managers user admin.

Project managers should be able to add users to their project.