Extracted the DI loading of an array from the YamlFileLoader

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | sort of
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | n/a

This allows to reuse the logic easily for other loaders needing to extract data from an array.

Note that references and expressions are subject to the same syntax than in YAML files. the goal is to load arrays from a place where you might not be able to instantiate objects.

currently, only the YAMLFileLoader is using it, but the PlainArrayLoader (better named ArrayFileLoader btw) submitted in #11953 could reuse it as well. This would make it benefit from the safeguards added in #11374  as well.

I haven't added dedicated tests yet (but the code is executed by the YamlFileLoader tests). I can add some tests if there is an interest in merging this.
It would be damage to remove this shortcut syntax for the PHP array loader only because it's possible use real objects which is more verbose.

``` yaml
# YAML example:
parameters:
    my_mailer.class:      Acme\HelloBundle\Mailer
    my_mailer.transport:  'sendmail'

services:
    my_mailer:
        class:        "%my_mailer.class%"
        arguments:    ["%my_mailer.transport%", "@?logger"]
```

``` PHP
# PHP array equivalent
return [
    'parameters' => [
        'my_mailer.class'     => 'Acme\HelloBundle\Mailer',
        'my_mailer.transport' => 'sendmail',
    ),
    'services' => [
        'my_mailer' => [
            'class'       => "%my_mailer.class%",
            'arguments'   => [ "%my_mailer.transport%", "@?logger" ],
        ],
    ]
];
```

``` PHP
# PHP with objects is more verbose
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;

return [
    'parameters' => [
        'my_mailer.class'     => 'Acme\HelloBundle\Mailer',
        'my_mailer.transport' => 'sendmail',
    ),
    'services' => [
        'my_mailer' => new Definition(
            '%my_mailer.class%',
            ['%my_mailer.transport%', new Reference('logger', ContainerInterface::IGNORE_ON_INVALID_REFERENCE, false)],
        ),
    ],
];
```