Computing Functions of Random Variables via Reproducing Kernel Hilbert Space Representations