Consolidating logic for replacing codons.

This commit changes homology.fix_homology_issues to use a common
method in codon_replacer.