Eighth-order vacuum-polarization function formed by two light-by-light-scattering diagrams and its contribution to the tenth-order electron g-2