First-principles investigation of phonon softenings and lattice instabilities in the shape-memory system Ni2MnGa