Added decoding checks for the most obvious of sam parsing failures.

Note that some of these cannot be done in bam_read1 due to it not
having enough information (no header), so they are performed in
sam_read1 instead.

The auxiliary tag checking needs far more work, and is only done in
sam_format1 at present. I'm not sure there is a way to make this check
efficient given that a lot of calls to sam_read1 may not care to
decode auxiliary data. Instead we maybe just need to have a set of
standard auxiliary tag parsing functions and make sure all have
appropriate error handling.
Removed old comment from earlier code.
Merge branch 'develop' of https://github.com/samtools/htslib into develop
Further fixing of auxiliary tag decoding.
Added the ability to do samtools index on a CRAM file.

This is not the same as being able to use the index. This has not been
added yet.
Compile cleanly without warnings with gcc 4.6.3
Fixed return status checks of fread calls
Merge branch 'develop' into bcftools+calling
vcf: Support for regions in the form chr|chr:pos|chr:from-to|chr:from-
tbx: Sanity check if the file type meets the expectation, detect non-numeric fields
hts_idx: check return status of bgzf_read
bcf reader: Fix in chr:pos type of regions
synced reader: Support for BED regions/target files
synced reader: regions and targets now support VCF; Fix for match_alleles by reverting 0-terminating chr modification
synced reader: Give a hint when tabix was used with wrong column indexes for regions/targets
pileup: Detect non-recoverable errors and exit with proper status
vcf: new APIs bcf_alleles2gt and bcf_gt2alleles; bcf_synced_reader: recognise compressed BED files
Resolved merge conflicts
Merge branch 'bcftools+calling' into develop
Merge cram_index_build() from github.com/jkbonfield/htslib

bam_index_build() now also works with CRAM files, though this might not
be the ideal place to plug into index-building.  This merge also brings
various consistency checks mostly around reading aux fields.