Fix EZP-21955: Access to restricted content results in error 500

Link: https://jira.ez.no/browse/EZP-21955

Previous PR: https://github.com/ezsystems/ezpublish-kernel/pull/618

## Description
Giving arguments to the AccessDeniedException leads to side effects and an error 500 being sent. I opened an issue on the symfony bugtracker regarding this: https://github.com/symfony/symfony/issues/9544

Example on symfony's documentation show usage of this exception with no arguments: http://symfony.com/doc/current/cookbook/security/securing_services.html

## Test
Manual tests