Fix EZP-21666: refactor PromiseCAPI and PromiseService classes
Fixes according to review