Infrared Problems in QED and Quantum Gravity