Homeland Security official John Cohen will take over leadership of the department’s intelligence branch, an office that is still trying to find its footing after a series of controversies during the Trump administration.