tools.js: get_mutations: deal with common gaps
As get_codons may return codons with gaps inside, testing for the codon length is not enough we must first clean the codons by removing the common gaps. However the codons must not be cleaned to early so that positions are properly counted. See #2056