Added low level API to use node promises and functions

* Allow tests to use first/then to reuse javascript test code
* Adds node/promise to call regular node code