Structural and magnetoelectric interactions of (Ca, Mg)-doped polycrystalline multiferroic CuFeO< sub> 2