Ab initio study of the mixing of valence and Rydberg states in O2: CI potential curves for the3Σu−,3Δu and3Πu states