Threat of lawsuits over heartburn drug had wiped £30bn off shares of GSK, Pfizer, Sanofi and Boehringer Ingelheim