A three-year temporary Leave to Remain scheme will replace free movement, under government plans.