Quantum impurity in a Luttinger liquid: Exact solution of the Kane-Fisher model