Lorentzian 3-manifolds and dynamical systems