Neutron star cooling and the rp process in thermonuclear X-ray bursts