Make hts_idx_push no longer return 0 after the first unmapped read. This fixes idxstats
vcf: separate header lookup from field getter

Create two alternatives to bcf_get_info and bcf_get_fmt allowing the
user to query the header id for the tag once and then accessing the
fields directly using index lookups.  Modified the two existing
functions to use the index lookups so we don't repeat functionality.

Added the following functions to the public API:
```c
bcf_get_fmt_id (bcf_t* line, const int id)
bcf_get_info (bcf_t* line, const int id)
```
Merge pull request #127 from broadinstitute/broad_header_lookup

vcf: separate header lookup from field getter
Merge pull request #124 from dpryan79/develop

Make hts_idx_push no longer return 0 after the first unmapped read. This...
faidx API to access sequence stats
bcf_get_info_values: Return correct INT8 and INT16 missing value
Minor documentation update
Correct reference lines
Removed the .gz, .Z, .sz etc suffix searching when looking for reference files.

These are a hang-over from the Staden Package io_lib
days, but did not function correctly in htslib anyway as we had
already removed the decompression code (plus it was inappropriate for
http requests to boot).
Remove the | from the default REF_PATH.

Although this is still syntacally considered legal by the code, it has
no effect and so this may just lead to confusion by the reader.
Minor speed increases to cram_byte_array_stop_decode_init and
GET_BIT_MSB macros.
Added a range coder (order 0 and 1) plus support for LZMA if compiled
in (no option for this at present).

Internally the choice of compression method is now a bit field
listing the various methods suitable.  To aid this, ZLIB_RLE is its
own method internally (although just ZLIB in the file format as it is
in the same ZLIB byte stream format), allowing better for auto-tuning
between fill ZLIB and RLE only variants.

This means we can specify as many encoding methods as we support and
get the code to auto-tune to the best methods available.
Tweaks for specifying version number. Now accepting version 3.0, and
also correctly setting the globals.

FIXME: shouldn't be using globals!
Updated the version checks to lop off major/minor components rather
than using an exact == comparison.

Also fixed the EOF block for version 3.0.
Fixed BETA codec so that it honours beta offset value for zero length
codes.
Bug fix to the external decoders. If there is an attempt to decode 0
bytes then it no longer matters if the block does not exist. (This
comes about when faced with silly CIGAR strings like "0S".)

Bug fix to cope with block searching during encoding where
slice->block_by_id is not defined.  Note this doesn't happen in normal
behaviour, but the change is for code validity.

Plus a couple minor spacing changes and commenting.
Added support for more codecs, as part of refactoring how data is
pushed.  These were in the V2.1 spec, but not used.

- EXTERNAL now access type char, instead of only for int.
- BYTE_ARRAY_LEN is now implemented fully for encoding allowing two
  distinct sub-codecs.
- BYTE_ARRAY_STOP is now fully implemented.

Both the _LEN and _STOP codecs can now be used as proper obj->encode()
style codecs, rather than assuming the calling code is manually
filling out the data in the appropriate format. (Although this is
still done by cram_encode.c.)
Major refactoring of the way CRAM handles external blocks.
We now prefer to output as many things as possible to their own
specific external block instead of utilising the CORE block more
often.  This has the impact that it is much easier to do a partial
decode.

- The C structs are now more array based, preferring ->block[DS_XX]
  instead of ->XX_blk and similar.

- Many more block types wil be external by default now. It
  auto-selects CORE vs external based on size.

- Selection of compression algorithm for external blocks is more
  advanced.  Every external block has a metrics array element. This
  now tracks more than 2 types of compression and it culls candidate
  methods if they repeatedly are unpromising.

  The upshot is the hard-coded selection of which method to use for
  which block is (mostly) removed in favour of auto detection.

- CRAM now has the option to ignore certain types of fields when
  decoding.  Combined with more external blocks this permits faster
  decoding for tools like scram_flagstat, potentially 2-3x faster.

- Auxiliary tags now get split up into multiple external blocks based
  on data type. We still aggregate many together, but tag strings,
  integers, sequences and quality strings now get their own blocks.

Also sped up the process_one_read() function when converting from BAM
packed sequence to base-calls.
Removal of a couple memory leaks added in the restructing of the last
patch.
Bug fix of use of TAG_ID macro and k vs key in hash for auxiliary
headers.

Updated the encoding of auxiliary data itself to agree with the
headers (and with the latest Scramble updates).

Bug fix to encoding the 'd' (double) aux data type.  We've never
tested
this as it's not even in the SAM spec, but I added it anyway as
samtools seems to include it.