Hungary has declared a state of emergency after a large factory spilled toxic red slime all over the country, killing four people.