Towards the Unification of Generative and Discriminative Visual Foundation Model: A Survey