Liverpool says Mohamed Salah will leave the club at the end of the season after nine years at Anfield.