Towards Graph Foundation Models: A Survey and Beyond