You can add callbacks to be executed when a transaction completes. We
usually do this when sending messages, but not always.
Previously, the logic was "add a callback that runs the completion
function, if it exists." Now, the logic is "if the completion function
exists, add a callback that runs it."
I think this slightly better reflects our intent, and helps reduce
memory usage (and potential capturing?) slightly.