perform invalidation directly on writes (#5786)
### Description
This changes the `write` function in the filesystem to invalidate the
path directly instead of going through the watcher. This makes it easier
to find write conflicts as they will directly hang the compilation.
Tracing can be used to print out the cycle of writes.
Closes WEB-1427