Scattering Amplitudes in Gauge Theory and Gravity