Maintain HEAP_EMPTY invariant when an input is empty

Ensure h->b is NULL when we hit EOF on the first read, just as it is
when we hit EOF later in the file.  Fixes #309 and also prevents a
memory leak for an input file with no records.

Also use bam_init1()/bam_destroy1() instead of creating and destroying
bam1_t structs by hand.