Clean up InputConfigDiag.cpp.

Changes a bunch of for+iterator loops into foreach loops.