Optimization of Mn doping in group-IV-based dilute magnetic semiconductorsby electronic codopants