Samsung says it will build $17B chip factory