Algebraic cohomology of topological groups