Engineering quantum systems with coherent feedback control