[WIP] [Serializer] Fix BC break since 2.5

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| License       | MIT

We spotted a BC break after upgrading to 2.5. The break seems to originate from PR #10668 and I hereby submit a test that passes if I revert the XmlEncoder.php back to before the PR.

The result of the given decode call currently is (notice the "#cdata-section"):

```php
array(1) {
  'firstname' =>
  array(1) {
    '#cdata-section' =>
    string(12) "Paul <or Me>"
  }
}
```

I am looking for help fixing the issue, because so far I wasn't able to come up with a fix. @csarrazi as an author of the PR, do you perhaps have any thoughts on this matter?