Semi-infinite flags. II: Local and global intersection cohomology of quasimaps spaces Betti numbers of smooth Schubert varieties and the remarkable formula of Kostant, Macdonald, Shapiro, and Steinberg 