Maldives ex-leader Mohamed Nasheed to contest elections