Ex-Maldives president vows to run for office after prisoners freed