Change some u-ints to size_t

There are some loops for which we had unsigned ints being compared to
size_t (from vector.size() ), so changed container indices to be size_t.
Also apparently need to include <cstddef> since type size_t is not in
scope anymore.