f(R) Black Holes as Heat Engines