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

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