It's the whole picture, not just one thing. If you like research, do it. Research seems more important in the more competetive residencies like optho, derm, ENT, etc. But there are plenty of people who've gotten spots in those without research.
Yes, I think leadership positions show some good qualities that people look for in choosing residents, but again, only do this if you are really interested in doing it, not just for your application.