Sanity-check tid in hts_itr_query()

e.g. if the headers given to hts_itr_querys() have more reference
sequences than the index, we'd rather return failure than crash here.