Add support for calling promise.done with no arguments. Closes #2161