Implement configuration merging

Fixes #418
Fix name regex: allow single-letter names
Fix errors reported by linter, allow running it during tests
Document configuration merging
Refactor config_mock module to not use globals and fix tests