Differentiable Sampling of Categorical Distributions Using the CatLog-Derivative Trick