Iran may have averted US strikes for now by pledging not to execute protesters after pressure from President Donald Trump.