Allow enabling query param test flag with config parameter queryParamTestFlag

If the flag is nil, then tests are always run. Otherwise the given flag
value is checked.