A Survey: Collaborative Hardware and Software Design in the Era of Large Language Models