The CARMENES search for exoplanets around M dwarfs. Revisiting the GJ 581 multi-planetary system with new Doppler measurements from CARMENES, HARPS, and HIRES