A state of emergency has been declared for a town in northern Alberta where a large wildfire is raging out of control and threatening homes.