The UK set up a secret plan to resettle thousands of Afghans in Britain after a leak accidentally disclosed information.