At ceremony marking 50 years since Yom Kippur War, president urges Israelis to set aside differences and unite like in 1973, since 'internal threat is the most acute of all'