Synergizing Foundation Models and Federated Learning: A Survey