Add infrastructure to pypeline to allow for pipes to provide custom invalidation, by implementing an `invalidate` function.