Various parameter cleanup

There's now three layers of ways to specify parameters, in decreasing order of precedence:
1. Setting global values
2. Reading stuff from config
3. Default values (these should be immutable)

This refactoring avoids the hack we've had where we change the default values for global parameters. It also cleans up how we read from config – it's all just three cascading levels. It also removes some stuff in interface.py to set up config for some environment params
ah, gotcha now. I think it's cleaner if you fix the mocking to raise the exception.