Sir Keir Starmer and Emmanuel Macron have agreed a pilot "one in, one out" scheme for migrants who cross the Channel in small boats.