This method enables pipes to specify a custom invalidation logic. This
change enables us to supress automatic model tracking in certain parts
and then handle the consequences by hand.
Make sure you read the TODO before using this.
Replace the stub implementation of invalidation with the proper
implementation. A ReadPathCache is added to each global so that it can
keep tracks of what target are associated to which read paths.
`DocumentError`s are the inteded way of propagating errors from the
pipeline to the frontend when a location is required to inform the user
of the error whereabouts.