convert2geno: change coding for multi-allele case

  - instead of 2^g1 + 2^g2, use 2^(g1-1) + 2^(g2-1)
Move convert2geno from R to c++