bcftools view: Output CLR,UGT,CGT tags in -m pair/trio calling. In this version, consistency with output genotypes is not being checked.
bcftools view: prevent segfault when running in plain mode, p1 then does not exist
bcftools view: previous fix in kt_fisher_exact (PV4 annotations, fet.c) was wrong. Will this one work better?
Merge trivial changes from htslib's knetfile.c

Currently htslib's knetfile.h is identical to ours, and its knetfile.c
differs by a bunch of trivial casts (3f596142, for compilation as C++)
and some non-trivial code differences.

Merging the trivial changes facilitates studying the interesting ones.
Use htslib's klib instead of our own

The htslib versions of klist.h and kseq.h are functionally identical to
or slightly updated from those previously in samtools.

Htslib's ksort.h and kstring.c/.h have been replaced with these samtools
versions.  (With some extras from htslib merged into kstring.)

The knetfile.[ch] versions differ only in the return value of knet_seek():
various editions of this function have returned their off_t argument
(clearly wrong), 0 (as fseek(3)), or filepos (as lseek(2)).  Replacing
our (0-returning) one with htslib's (filepos-returning, which is better)
causes no trouble as (since 32c42f67) samtools currently checks only for
knet_seek() != -1.

The htslib khash.h is 0.2.7 to our 0.2.5, but should be compatible.

Include paths are set up such that #include lines need to change from
need to look like with headers properly installed under /usr/include, so
it is convenient to have them look the same again uninstalled headers in
a development directory.
Use htslib's bgzf.h, faidx.h, and razf.h

Htslib has direct equivalents of these headers and their corresponding
.c files.
Ensure examples/calDepth compiles

...when built from the top-level with "make SUBDIRS=examples -k".
Use all-bgzf_*() functions instead of a mixture
bamshuf.c already uses the htslib API

...as it was backported from the htslib repository.
Use the generic bam_write1() here

...as it suffices, and no bam_write1_core() equivalent will be
available via the htslib API.
Remove bam_nt16_nt4_table from the public header

...as it is used only by samtools $(AOBJS) files and should not be
in the public API.  (There is no equivalent in htslib at present.)
Call bam_remove_B() explicitly

The bam_no_B global has no equivalent in htslib, and will soon
be removed.
Temporarily comment out header manipulation

This code uses header->dict and similar header fields that don't exist
in the same format in htslib's bam_hdr_t.  Temporarily remove it with
"#if 0" until htslib's header API has been fleshed out a little more.
Replace libbam with htslib API wrappers

The libbam API functions now call through to their htslib equivalents.
Eventually samtools will be recoded in terms of htslib directly, but
this approach enables a fast-moving transition and provides a degree
of compatibility for third-party code.
Move bam_fetch() to libbam's bam.c

so that bam_index.c contains exclusively application-level code.
Merge branch 'develop' into with-htslib
Include htslib in our build directory

Eventually perhaps we'll be able to install an htslib-dev package
during before_install instead.
Include htslib rules and add header dependencies

Use the rules and variables from htslib.mk to write out exact
dependencies on htslib headers and (for executables) library.
With this, samtools builds with "make" from here are correct
even when htslib source code is being modified.

(A little more infrastructure is needed to select between static
and shared libhts.)
Added BGZF indexing and reindexing capability to bgzip. Fixed -b seeking.
Added a test suite for samtools, currently faidx and bgzip are tested.