Statistical mechanical deconvolution of thermal transitions in macromolecules. II. General treatment of cooperative phenomena