Generalized quadratic curvature, non-local infrared modifications of gravity and Newtonian potentials