Oil leak wont be causing the idle issue but needs to be fixed. The o'ring will have perished or been damaged, its a cheap standard part from Toyota and takes all of 5 minutes to fix, just check and reset the timing afterwards as you have to pop the dizzy out to do it. Idle problem is likely caused by rusty/crappy water or gunk in the idle up mechanism in the bottom of the throttle body. Rip the throttle body and waters lines off and give the whole system a flush. 95% of the time this solves the problem.