Make YAML optional

This PR makes symfony/yaml optional instead of required, for those who might not need it.

It also integrates @fabpot's suggested usage of the OO classes for the Yaml parser, instead of the static methods in the `Yaml` class.