Higher-dimensional inhomogeneous perfect fluid collapse in f(R) gravity