Switch from int to size_t for all size results.

There are a lot of int conversion warnings in x64, this fixes those by changing to using size_t as the specific type to use for sizes.
Fix ALL x64 warnings.

The last of them. All warnings in both x32 and x64 are now fixed.

These were using pointer differences, and could easily have overflowed 32 bit values.  Mostly changed to use size_t for deltas, but a couple of ptrdiff_t for actual pointers.