The US president has not understood the lessons of past wars for regime change in Iraq and Afghanistan