The former president of the Maldives, Mohamed Nasheed, has been granted refugee status in the UK, according to his lawyer.