Add Beacon's AlleleCount

This is a piece of code that I wrote some time ago while I was working on the AMPLab beacon. It generates text files with frequencies of the alleles observed in an ADAM converted vcf file.
To turn map + filter into flatMap, you'd want:

x match {
       case (chr, position, refAllele, varAllele, ADAMGenotypeAllele.Ref) => Some((chr, position, refAllele))
       case (chr, position, refAllele, varAllele, ADAMGenotypeAllele.Alt) => Some((chr, position, varAllele))
       case _ => None
}