Gravar-mail: Monte Carlo simulation of coherently scattered photons based on the inverse-sampling technique