Benchmarking the calculation of stochastic heating and emissivity of dust grains in the context of radiative transfer simulations