Mine is not an answer but a question. I'll delete it if it is improper.
Why, as the questioner says, if $X$ were Killing and $D$ integrable then $X^\flat(X).X^\flat$ should be closed on $M$? Could someone explain me the reason for this?
Here follows what I have understood:
Given a smooth non-singular vector field $X$ on a Riemannian manifold $(M,g)$, we get the smooth distribution $D$ on $M$ globally generated by the smooth non-vanishing 1-form $X^\flat=g(X,\cdot)$. By Frobenius' Theorem, $D$ is integrable iff ${X^\flat}\wedge{d{X^\flat}}=0$ on $M$. This integrability condition is at the same time necessary and sufficient for the local existence of integrating factors for $X^\flat$: i.e. for any point $p$ of $M$, there exists a function $f$ such that $f.X^\flat$ is closed in a neighborhood of $p$.