Abstract involutions of algebraic groups and of Kac–Moody groups