Columnist Ayaz Mir wins appeal to contest elections