Checks if ReferenceFile is indexed, and if so, uses it

added tests.
Merge pull request #48 from samtools/yf_allow_referenceFileWalker_RAM_on_indexed_BAMs

Checks if ReferenceFile is indexed,