Avoid unnecessary copies of arguments to hpx::function.