Non-perturbative O(a) improvement of lattice QCD