PermissionsTestAll: refactor code.

- remove confusing var names,
- use camel-case,
- remove iterator use for map entries,
- use enhanced for loop,
- use maps to reduce the number of vars.