Only print output on processor 0

This required passing a reference to a BaseEnvironment to the
OptimizerMonitor so we can figure out which processor we're on.