Computation of the cohomology rings of Kac-Moody groups, their flag manifolds and classifying spaces