US president joins Israel’s attacks on Tehran months after vowing to keep America out of new conflicts