Numerical solution of the coupled Haïssinski equations for the equilibrium state of an arbitrary bunch train in an electron storage ring