bcf_write: Error message instead of assert + propagate the error up
vcf_parse: Detect incorrect number of columns
vcf: Fix BCF syncing when only partially unpacked
vcf: Fixes in bcf_translate
bgzf: Do not end prematurely on non-critical Z_BUF_ERROR zlib error
vcf: Fix bcf_hdr_id2hrec, col_type parameter is needed as well
bcf_trim_als: Propagate error instead of assert
bcf_update_alleles: Reference length with INFO/END

must be set explicitly by the caller. If unset, bcf_write()
calls strlen(ref) to set it in order for indexing to work.
Fix in index initialization
Fixed bug in bcf1_sync. The main cause of the bug is as follows:
bcf_unpack(bcf_rec, BCF_UN_STR);
bcf_update_id(bcf_rec, id);
This causes bcf_rec->d.shared_dirty to be set.
duplicate = bcf_dup(bcf_rec);
This calls bcf1_sync(). Since bcf_rec->d.shared_dirty is set, the shared
data is re-created in tmp.s, bcf_rec->shared.s is freed and
bcf_rec->shared.s = tmp.s. However, bcf_rec->unpack_ptr and
bcf_rec->d.info[i].vptr still point to the old shared.s region which is
invalidated.
The fix is done by assigning bcf_rec->unpack_ptr and the vptr fields
after tmp.s is fully constructed in bcf1_sync. I use unpack_offset and
offset_array to track the offsets of these fields with respect to tmp.s
Improved bug fix of bcf1_sync() from the commit 2504243:

- additional data structures are not necessary
- FORMAT fields were not treated

Updated VCF API tests to cover situations where unpacked
structures are synced and edited again.
synced_reader: Consider non-variant sites as matching in comparisons
Add extern "C" around API to enable C++ linking
Merge pull request #108 from MauricioCarneiro/develop

synced_bcf_reader: Add extern "C" to enable C++ linking
Fixed REF_PATH to handle URLs better.

Without a REF_PATH it now defaults to using the EBI's MD5 service.
With a REF_PATH it now parses it in a friendly fashion. The URL= part
is now optional, instead auto-detecting http: and ftp: (no https yet).
Also even when using : as a path separator, when faced with a URL it
knows the syntax and treats the colons in http://host:80 as part of
the URL and not the separator. The old :: escape still works.
vcf: Detect broken structured header lines
synced_reader: Logical complements of target regions
bgzf: Translate windows line endings

so that files produced on windows (\r\n) can be read on
UNIX systems (\n)
bcf_hdr_combine: Check for tags of conflicting lengths
faidx: Exit with an error if run on gzip-ed files