The fractional maximal operator and fractional integrals on variable $L^p$ spaces