A Comprehensive Survey of Scientific Large Language Models and Their Applications in Scientific Discovery