Formal and analytic integrability of the Lorenz system