The government has agreed a new deal with France in an attempt to stop migrants crossing the English Channel on small boats.