fix broken t/factory.t test
Propagate context to engines

When the app context is set, use the trigger to propogate the context
or clear the context in all defined engines.