final revision, best header patterns 

-use population count (# of bits different) rather than number of bytes different
-use a double 0-1 probability (number of bits different/number of bits compared) rather than an int threshold
- removed thing about forcing PID=1000, since this is done in repairing the headers via the templates
- replaced the GETBIT and PUTBIT with one op per byte (buf[i+k] &~h->mask[k]) | (h->data[k] & h->mask[k])
- use a Header * h for readability, but this required converting all the . to -> which is annoying
-there's also some statistical printing stuff in there (after 308), just ignore that.