Epitaxial strain induced magnetic transitions and phonon instabilities in tetragonal SrRuO3