Serialize references to `WorkerExecutor` to the instant execution cache. Also serialize broken `Provider<T>` instances, in the same way that broken `FileCollection` instances are serialized. This is really just a work around, and we should instead offer ways to avoid writing these broken instances to the cache.
Change the instant execution cache bean serialization so that it honors the `writeReplace()` contract for `Serializable` types. This allows a plugin to use the Guava collection types, which happen to use this contract for serialization. This could be viewed as a work around for the lack of support for multiple classes with the same name (and that is certainly the motivation). However, this provides a potential escape hatch for plugin authors to work around serialization issues. It also provides a nice migration path for re-using the bean serialization in other places, such as task properties, isolated work parameters and tooling models, all of which currently use Java Serialization as the general purpose contract.