Additional performance fixes involving Samfile.references/.lengths.