Apple plans to invest $100bn (£75bn) over the next four years in developing US-based chip production facilities as part of a deal announced by the White House.