Redoing promises based on https://github.com/domenic/promises-unwrapping
Replaces usages of Promise.when, .resoved and .value
Removes legacy Promise usage
Fixes testing harness slave
Merge pull request #1014 from yurydelendik/promises-v2

Implementing Promises as close as possible to the spec