Microscopic study of the 7Li(n,γ)8Li and 7Be(p,γ)8B reactions in a multiconfiguration three-cluster model