Thermodynamics and Crystallization of Random Copolymers