Fix while loop breaking (#3472)
Cleanup, signedness, range checking (#3472)
Implement Cody's suggestions (#3472)
Merge pull request #3496 from dschwen/tensormech_3472

More tensor_mechanics cleanup