Interlayer phonons and c-axis charge response in the high-temperature superconductors