Factor out common code for building isopackets
Don't include line number comments in isopackets

The extra legibility is not as useful for code that is always part of
core as it is for user's packages, and it actually has a notable (25%)
effect on isopacket load time.

Fixes #3218.