Manchester United and Serbia defender Nemanja Vidic has retired from international football at the age of 30.