Light cleanup to InputCommon.

Replaces much of the iterators that litter this section of the codebase with foreach loops where possible.

Also clean up a little bit of the comments that describe the interface classes.