Add garbage collection to CSRF token generator/validator

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | na
| Fixed tickets | #238
| License       | MIT
| Doc PR        |