Representations up to homotopy and their cohomology