[Serializer] Add the missing context support inside the XmlEncoder
merged branch benji07/patch-1 (PR #8416)

This PR was squashed before being merged into the master branch (closes #8416).

Discussion
----------

[Serializer] Add the missing context support inside the XmlEncoder

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

$context variable was added in symfony 2.3 but not inside this encoder

Commits
-------

5c27d7e [Serializer] Add the missing context support inside the XmlEncoder