Solubilities of nonvolatile solutes in polymers from molecular thermodynamics