add thenResolve and thenReject utility methods
Merge pull request #1291 from RemcoBlok/patch-2

add thenResolve and thenReject utility methods