Lego is planning to spend more than $1 billion to build a factory in the United States.