Chaotic cold accretion in giant elliptical galaxies heated by AGN cosmic rays