Fixes a number of "comparison between signed and unsigned" warnings.

This is a start fixing a few of the easiest to fix warnings with regards to issue #735.

There are a good bit more to be fixed. I found a few that changed behavior of the tests so I started over with the easiest set first.