Add htsFormat and format-detection API functions

Adds hts_detect_format() that returns an htsFormat based on peeking
at the beginning of an hFILE, and hts_hopen() that allows hts_open()
to be replaced by hopen()...hts_detect_format()...hts_hopen() where
desired.

Followups will add functions deriving an htsFormat based on filename
extension or -O-style option, functions to return a human-readable
description or hts_open()-mode based on an htsFormat, and an htsfile
utility that uses them.