Fix EZP-21666: refactor PromiseCAPI and PromiseService classes

Classes are fixed and refactored. Tests are on the way...