Calculate qmax in IntegrationContext

This commit moves the calculation of qmax into the IntegrationContext so
its values can be printed out with the --trace option.