Probability distribution of residence times of grains in sand-pile models