I'd go with the i5 8500, and get the few extra FPS from the 1070ti, that having a better CPU could make up for.
Both systems will perform very closely. If you are considering AAA gaming, I'd say your better off getting 16gb and the 1070 with the 8500. solid gaming at ultra up to 1080p 60-120hz