Semi-infinite flags. II: Local and global intersection cohomology of quasimaps spaces Transformation of a pair of commuting hamiltonians quadratic in momenta to canonical form and real partial separation of variables for the Clebsch top 