Minister’s failure to consider Taliban threat leads to judge overturning refusal to permit Afghan man to bring his family here