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
Suppress compression suffix search on default EBI MD5 service

The default REF_PATH setting should not query EBI's MD5 service for
compressed files like <md5>.Z, because such queries will always fail.

Also fix the URL colon auto-detection when used in conjunction with '|'
to suppress suffix searching.
Merge REF_PATH fixes and libcurl removal (PR #111)

Eventually we will want an htslib-native open_path_hfile() and then to
get rid of open_trace_file.[ch] and associated code, but for now this
implementation serves us well.

(Also fix Makefile dependencies and use hclose_abruptly() for cleanup.)
vcf: Support for mpileup's symbolic <X> allele
Add license file

This code has been made available according to the terms of the
MIT/Expat license; this adds a LICENSE file stating those terms.
Add MIT/Expat license boilerplate
Fix copy/pasto
Files under cram/ are BSD-licensed

Note in LICENSE that files in cram/* are licensed according to the
Modified (i.e., 3-clause) BSD license, which is mostly equivalent to
the MIT/Expat license.

Update copyright years in cram_decode.c and cram_io.h.
On open failure, set errno instead of printing message

Having this low-level routine printing diagnostics itself causes
problems now that hopen() is used to resolve files via paths such
as $REF_PATH.  If the file is fulfilled by the second path entry,
a not-found error may already have been printed from the first entry.

Instead set errno so that higher-level callers have a chance to emit
a useful error message themselves where appropriate.