Belarus has granted asylum to a former Polish judge who faced espionage charges at home following his defection in May to the Kremlin-allied country.