Pharmaceutical giant GSK will pay up to £1.7billion to settle thousands of legal cases that claimed its heartburn drug Zantac caused cancer.