Configuration validation using symfony/config

Greatly simplifies code. Also: improved tests, removed legacy settings
(for stats).