Computer simulations of diffusional phase transformations: Monte Carlo algorithm and application to precipitation of ordered phases