Upper bounds for local cohomology for rings with given Hilbert function