Mauritania releases ex-president amid corruption probe