An iterative method for the construction of N-body galaxy models in collisionless equilibrium