Secondary Calculus and Cohomological Physics