Lattice dynamics and microscopic mechanisms of the spontaneous magnetodielectric effect in the antiferromagnetic fluoroperovskites KCoF3 and RbCoF3