A major fire in Malaysia’s Sabah state has destroyed about 1,000 homes and displaced thousands of residents, according to official and media reports.