Hundreds of thousands of people fled a deadly border conflict, the authorities said, some sheltering at a racetrack in Thailand and some near temples in Cambodia.