Popular former leader will face a retrial in case of misappropriating gifts received in office, but will be able to run in upcoming elections