Replacing deprecated security context

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.6+
| Fixed tickets | #5411

This PR turned out larger than wanted. I wasn't able to test all changes, but as stated in http://symfony.com/blog/new-in-symfony-2-6-security-component-improvements replacing should work without problems.