Dow tops 50,000 for first time as tech stocks extend rally