[SECURITY] Fix CSRF, XSS and code injection vulnerability.

This commit fixes the following security issues:

  * a CSRF vulnerability when creating new topics and posts
  * a code injection vulnerability in the attachment funcionality.
  * a XSS vulnerability when displaying the user profile.

Change-Id: I1b0562feae31d9eaf655d31333d3323d1f1ef0f4
Reviewed-by: Martin Helmich
Tested-by: Martin Helmich
Reviewed-on: https://review.typo3.org/27610