[Security] Add check for supported attributes in AclVoter
bug #10863 [Security] Add check for supported attributes in AclVoter (artursvonda)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10863).

Discussion
----------

[Security] Add check for supported attributes in AclVoter

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

Couldn't get the tests to pass but the issues where unrelated to change.

This fixes issues with Attribute containing ExpressionLanguage instance when using allow_if.

Commits
-------

a605a3d [Security] Add check for supported attributes in AclVoter