Two former FBI officials settled their lawsuits with the Justice Department, claiming it violated their privacy rights by leaking text messages they sent one another, disparaging former President Trump.