Config validator

This is a redo of the configuration validation work after pairing with Sneha yesterday, and getting a clearer idea of a schema together (plus having spiked on the methods used in both hash_validator and Kwalify).

Much cleaner than the original PR, and in a form where we can easily improve it with new validation functions.