Improved whitespace handling by Extension

When using XML, you often do something like:

````rst
<controller-by-type type="Acme\Foo">
    200
</controller-by-type>
````
This will result in an error, because the value is not trimmed and the
priority contains a lot of whitespace.

In some cases, you don't want to trim the whitespace (for instance for
parameter values), but in this case I think it's save to trim them.

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