Firefighters and security forces in Chile are battling deadly wildfires that have killed at least 21 people and destroyed vast areas of forests.