refactor securitycentermodule to routes

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| Refs tickets  | #1788
| License       | MIT
| Doc PR        | -

refs #1788
the existing code was non-functional because `$v` was an array.  `json_encode` ad least made the code function because it is recursive. I think it is an unused parameter anyway, see #2010 

the Html purifier section needs work. I was just trying to get the code not to throw exceptions.