Border Patrol chief, who supported wall, is leaving job