The US and Mexico have agreed to a plan that allows some Venezuelan migrants to enter the US - but those who arrive illegally will be sent back to Mexico.