Spontaneous and stimulated emission from Co2+ ions in MgF2 and ZnF2