fix(api): properly resolve the promise if a callback throws an Error

Fixes #238 

Also abstracts the callback API to internally use the promises.
As a result we no longer need to resolve(result) & callback(result) or reject(error) & callback(null, error).