Move bam_fetch() to libbam's bam.c

so that bam_index.c contains exclusively application-level code.