Move some of the hardcoded C from gen_hydrapacket.py to hydrapacket.template.c