Fix EZP-21666: refactor PromiseCAPI and PromiseService classes

JIRA issue: https://jira.ez.no/browse/EZP-21666
Classes are fixed and refactored. Tests are on the way...