adding *promise-finish-hook*, allows for forcing async finishing or even running promises in a separate thread if desired. also adding tests.