Algeria frees opposition figure after vow to quit politics