Consistent use of size_t for casting pointers to integer type.

Have to start with the second change; the first one has a broken diff.