Turkish opposition's ex-presidential candidate resigns