Thousands leave South Waziristan before new battle