Cohomology of inverse semigroups