Maximal functions, factorization, and the R-boundedness of integral operators