[ADAM-353] Fixing issue with SAM/BAM/VCF header attachment when running distributed

Fixes issue #353. Runs header attachment per partition; not the cleanest fix, but it'll do. Modifies the SAMHeaderWritable class; without this modification, I was running into serialization issues.

@ryan-williams Can you give this a shot on your end? I've tried this on EC2 and it seems to work OK but would like to confirm that it works OK for you before merging it.
Yes; this causes the problem in #351 with structural variants. I've added https://github.com/bigdatagenomics/bdg-formats/pull/27 and https://github.com/bigdatagenomics/adam/issues/358 which are necessary to cleanly fix issue #351.