On Codazzi tensors on a hyperbolic surface and flat Lorentzian geometry