Limit the number of calls to indexBar:didSelectIndex: [fixed]

Modified version of PR #4, based on feedback.

The last selected index is stored in an instance variable as requested.