Optical phonons and magneto-elastic coupling in the ionic conductor AgCrSe$_2$