Britain has announced that European Union nationals will be able to apply for a three-year right to remain in the country in the event of a possible no-deal Brexit.