Introduce a WorkerFactoryBase.

This is the first step in allowing people to define non file based
worker factories.