Configuration refinements

Improve the code quality of the configuration sub-system: remove some duplications, reduce method complexity, remove some unused code, add some new test cases, improve code coverage, fix some code standard mistakes.
Well, it's better to return `array()`, for consistency. Anyway, it works also with `null`. In fact, the returned value is used by the `in()` method of Symfony Finder, which accepts both `null` and `array()`.