Chirally improving Wilson fermions I. O(a) improvement