How Can Recommender Systems Benefit from Large Language Models: A Survey