The Dow Jones Industrial Average hit the closely watched 40,000 level on Thursday. A slate of names are behind its ascent.