Mohamed Salah has signed a new two-year contract at Liverpool to put an end to months of speculation about his future with the Reds.