REVIEW: [NEXUS-6568] Add CSRF protection via OWASP CsrfGuard

https://issues.sonatype.org/browse/NEXUS-6568
http://bamboo.s/browse/NX-OSSF57

Most of the code is copied from OWASP CrsfGuard. Changes are detailed in JavaDoc.