Branes, Calabi-Yau spaces, and toroidal compactification of the N = 1 six-dimensional E8 theory