Fix EZP-21666: refactor PromiseCAPI and PromiseService classes