Fixes to Only and Except rules in config system (fixes #2043 amongst others)

Fix issues with Only and Except rules (like issue #2043).

- Adds some tests

- Makes them work at all (previously the split between matchesPrefilterVariantRules and matchesVariantRules caused all rules to fail rule checks).

- Re-checks Only and Except rules after executing _config.php files so that changes to the state of the system  (such as changing the environment type) are reflected in which Only and Except rules are used

  (Note: this check only occurs once, after all _config.php code has been executed, so if you change which rules match in one _config.php, then use Config::inst()->get() in another _config.php, the result will still be from the old rules)

Deliberately written to be "smallest possible change", rather than fixing any larger code design issues.