fix reference handling, correctly switch targets

Resolves failing updates to cached reference sequence.  These generated "alt is
the same as the ref" type errors, and monomorphic calls in the VCF.  They also
could generate spurious haplotype calls.  Also affected by this change were
"subsequence of zero length or negative offset" errors.  Bounds checking is now
integrated into the routines in Fasta.cpp, and out-of-bounds returns the null
string instead of blowing up.

When processing entire BAM files, rather than targets or specified regions,
freebayes would wait for the condition that there were no more alignments in
order to switch targets.  This would cause problems specifically when 1) an
alignment reached the end of a sequence, 2) there were still more alignments,
3) no targets were specified.  A clarification of the position and target
switching logic resolves this issue.
strand observation counts

In response to popular demand, the raw counts of forward and reverse
observation count return to the freebayes output.

SAF: forward alternate observations
SAR: reverse alternate observations
SRF: forward reference observations
SRR: reverse reference observations

A number of infrequently-used variables have been removed (X* mismatch
variables, CPG, discrete HWE sampling prob).
indel genotye likelihoods

This commit resolves a number of issues with indel genotype likelihoods.

First, although haplotype detection has proceeded across repeat structures in
the reference, the same extension was not applied to repeats which were not
represented in the reference, and only in reads.  This allowed reads supporting
the alternate to appear as if they supported the reference, leading to false
heterozygote calls for homozygous alternates.

Second, in some cases, it may be desireable to call haplotypes across regions
of low complexity.  --min-repeat-entropy provides this facility, requiring a
given number of bits per base of any reference-relative haplotype window built
around a repeat structure.

Thirdly, improvements in performance were provided by careful handling of
partial observations, specifically checking if apparent full-length haplotype
observations in fact support alternate haplotypes,

Fourthly, "null" observations (portions of reads which are N, variants that are
not specified in --haplotype-basis-alleles), are now correctly treated as
non-observations.  Previously, these were incorrectly coerced to be reference.

In all, these changes yield a 2% improvement in the area under the curve for
detection in 100 simulated 10x genomes (0.917 -> 0.937).  They also eliminate a
number of pathological errors in 1000 Genomes.

Also!  This commit includes bugfixes  for invalid memory access errors detected
by valgrind.
resolve #51

Slicing and dicing haplotype observations could lead to (erroneous) divided
indels.  Avoid these using a suitable guard in the haplotype observation
generation process (fithaplotype).
handling of large variants

Maintain the registered alleles set correctly.
checkpoint, resolution of haplotype breakage issue (a->empty() errors)

There are still some outstanding concerns with this commit, but a checkpoint is
necessary as this code state has excellent performance against indels, another
1% better than the previous commit.
further improvements to indel (and SNP) detection

A further 1% improvement in AUC for indels, and .5% improvemint in AUC for
SNPs.  Changes in this commit are not yet well-optimized, and users should be
aware that runtime performance here will be slower than in previous commits.
(3x slower for 100 10X samples.)  Subsequent commits will focus on reducing
runtime.
proper positional progression, resolves issue #52

A flag which indicated change in target region was not respected by the
previous commit.
avoid mixing true full and partial observations

Resolves common error mode causing "ref is same as alt" bug.
ignore un-flanked deletions at the beginning and end of alignments

Some aligners will report deletions at the beginning of alignments.  It is not
clear how to interpret these cases because, without flanking sequence in the
read, the indication of a relative deletion in the read is meaningless.  For
instance, a cigar for a 70bp read could be 1D70M.  What base in the read has
been deleted?

This resolves some bugs which generate errors like this:

    deletion...
    alt is empty
SAR and SAF should be Number=A in the header

Thanks to Rajgopal Srinivasan for catching this.
ensure allele homogenization works when homogenizing to reference allele
updated vcflib, fix ordering of flags to linker
Setting Release-Version v0.9.10
version 0.9.10

This begins the v1 release candidate series.  The change in version numbering
style recognizes the need to move the version past 0.9.9!  However, version 1.0
is meant to coincide with paper publication or submission.  Soon!

A large number of small changes land in this version, including changes to the
genotype likelihood calculations:

* Support for correct genotyping of large deletions.  This fix involved
correcting handling of "partial" observations of the reference allele.

* Default use of mapping quality in genotype likelihood calculations (this is
disabled via the --standard-gls flag).  Mapping qualities are incorporated via
the Effective Base Depth metric from snpTools (Baylor).

* Exclusion of mapping quality 0 mappings.  (This can be disabled with
--min-mapping-quality -1 --standard-gls).  The change in genotype likelihood
calculations means these are not considered meaningful.

These three changes improved the ROC-AUC for indels in simulation by about 1%,
which is substantial given that it now stands at 0.95.  No difference was
recorded for SNPs.

The commit also includes a change relevant to the output of variant records.

* Removal of variant parsing routines meant to standardize VCF records by
removing redundant information from the ALT/REF pairs.

These manipulation routines would, for example, remove portions of the REF and
ALTs which were always matching.  The canonical case would be a haplotype call
in which only a SNP was ultimately called.  The call would occur over several
bp of reference.  The manipulation is complex and caused errors in many
instances, which leads to many maintenance issues and sad users.

At present, VCF normalization is best-handled by external utilities, such as
vcfallelicprimitives from vcflib.  Retaining the haplotype information in the
call in this way clarifies which calls were attempted haplotype calls and which
weren't, regardless of output state.
avoid and resolve #6

Some aligners will place reads past the ends of short reference sequences that
aren't flanked by Ns.

Before this commit, freebayes would choke on this kind of issue, and say it was
"Unable to read reference sequence base past end of current reference
sequence."  Now, it just registers the error and continues, as it probably
always should have.
change behavior of --report-genotype-likelihood-max

This does not affect typical operation vs. the previous commit.
remove errant warning message

"What is this?" ... shouldn't happen.
extensive updates to documentation/manual (README.md)

freebayes now has a much better manual!

Please provide feedback and keep the questions coming!

Happy holidays to all.
removed horizontal lines from README.md

github already has these!  Cool.