Randomized sketching for Krylov approximations of large-scale matrix functions