Out of memory error
Hello @brentp, thank you for mosdepth, it's great.

I'm getting an out of memory error with 0.2.2 and a different error with 0.2.3:

v0.2.2:
```
mosdepth -b 1000 -n -t 50 -q 60 out in.bam
out of memory
```

v0.2.3:
```
mosdepth -b 1000 -n -t 50 -q 60 out in.bam
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
```

This is with a read set I have aligned to other genomes and a genome I have aligned other read sets to; mosdepth has worked fine on these other BAMs.

This is Oxford Nanopore data; basic stats for the read set:
```
 num_seqs         sum_len  min_len  avg_len  max_len     N50
2,051,690  12,566,075,726        5  6,124.7  265,781  13,969
```

And the genome:
```
num_seqs     sum_len  min_len   avg_len  max_len      N50
     408  19,282,250    1,000  47,260.4  956,893  300,798
```

Checking the BAM, there are reads mapping to 408 of the 408 contigs, so I don't think this looks like the bug that was fixed in 0.2.3.

Based on the region.dist.txt and global.dist.txt files, mosdepth processed 191 of the 408 contigs when it crashed. The last line is reporting for 0x coverage so it looks like it got through the 191st contig completely. That contig was 1706bp long; the next contig to be processed (according to the BAM header) was 28845bp long.

Any ideas as to what might be happening here?

Thanks
John