Energy of string loops and thermodynamics of dark energy