Ground state and lattice dynamical study of ionic conductors CaF2, SrF2 and BaF2 using density functional theory