Optimize promise tail calls by making ChainPromiseNode automatically detect and remove redundant nodes.