When President Donald Trump selected Mr. Kelly, the pick won broad support from Republicans and Democrats in part because they believed the retired Marine general would be willing to speak up and challenge Mr. Trump.