Phononic self-energy effects and superconductivity in CaC6