some serializer optimizations. slightly helps #7893

mostly this avoids memory allocation from Module fullname()s, and
boxing Ints.

this is backwards-compatible for *reading* old files, but written
data will not be usable by older julias.