The top US diplomat has met with Jordan's king and foreign minister during a tour of the Middle East, aiming to stop the Gaza war from spreading.