John Singer Sargent may be known for squandering his considerable gifts on paintings of socialites that he dashed off with nearly effortless panache, but “Sargent: Portraits of Artists and Friends,” opening Tuesday at the Metropolitan Museum of Art, sets him in a different milieu than that of the merely moneyed and pedigreed.