Independent presidential candidate Robert F. Kennedy Jr. held talks this month with former president Donald Trump about endorsing his campaign and taking a job in a second Trump administration, overseeing a portfolio of health and medical issues, according to four people familiar with the matter.