Eating a diet high in red meat and dairy products is linked to an increased risk of pancreatic cancer, a study suggests.