Refactor FASTA and QUAL readers to remove duplicate parsing logic

Confirmed that the small bit of indirection didn't affect performance of current FASTA reader implementation.