For decades, Ayatollah Khamenei has professed enmity with America. Now his regime is threatened from within the country.