Coherent feedback control and nonlinear optics in cavity QED systems