Fix endianness problems outwith CRAM code

In swap_data(), for 'B' we must copy the count into  n  when it is in
host format.  In test/sam.c, the same count is in host format while we
are checking it.  Hat tip @azlicic, cf #99; partial fix for #98.
Set NM/MD creation to be on by default.

Also amended the test harness to ignore NM and MD changes.  This isn't
ideal, but as we have no explicit tests for the validity of NM or MD
at the moment then it is sufficient.
synced_reader: Removed unused code
vcf: Change of bcf_hdr_add_sample() usage.

To increase performance with thousands of samples, bcf_hdr_sync() is called
only when explicitly requested by passing NULL.
Add sam_open_mode() API function

Aids in parsing options like -Ocram.  Requires documentation, but we'll
add that when we're sure the API is stable (in particular, having the
caller pre-supply the "w" is perhaps not ideal).
Remove val_unused -- use HTS_UNUSED instead

This macro is in the HTS namespace, so less collision-prone.
Added comments
Fixed bug : decrement n_info when removing INFO tag in bcf_update_info
Fixed bug : decrement n_fmt when removing FORMAT tag in bcf_update_format
Fixed bug : bcf_hdr_id2hrec_fixed added

Added debug flags in Makefile for use with gdb
1. Move elements of d.fmt array left when deleted in update_format()
2. -O3 in Makefile
1. Modified synced_bcf_reader to work with merges for gVCF files. Main
change - add a field in reader called last_valid_record_idx. This allows
vcfmerge to split intervals and add it to reader->buffer by manipulating
reader->nbuffer and reader->last_valid_record_idx
2. DEBUG flag in Makefile

TODO: FIXME
1. Terrible hack: Added boolean flag called is_split_record in bcf1_t
structure to determine whether a BCF record was created because of a
split in a gVCF interval. Used in a terribly hacky manner in vcfmerge.
Should be removed, once I have figured out how to obtain REF from
location.
2. When INFO and FORMAT fields are erased using update_info with NULL
arguments, I shift the elements of the info and fmt arrays and decrement
the values of n_info and n_fmt. Likely, we should set NULL pointers in
the deleted indices and not change n_info/fmt. This will be
faster;however, any applications using this must check for NULL
pointers as a proxy for deletion. Right now, vcfmerge does not work with
NULL pointers method, but works with the shifting method.