Liverpool have confirmed the departure of goalkeeper Loris Karius on a two year loan deal to Turkish side Besiktas.