Extract Config validation into its own method

- Extracted config validation into Config.validate!
- Stub Config.validate! in tests to fix test errors
  regarding side-effects of validation code.