Selectmenu: Prevent exception when the user types in selectmenu, when teh result is an optgroup

Hi!

This PR is probably done somewhat wrong, but I thought I should get this in before the weekend.

Ticket: http://bugs.jqueryui.com/ticket/10571

If you have a Selectmenu with ``optgroup``s, and type while it has focus, it may hit an ``optgroup`` as a result. If this happens, you get an exception.

Fiddle: http://jsfiddle.net/coLcs5pz/1/

Just put focus on the selectmenu, and type ``S``, and you'll get an exception in the console.
``Uncaught TypeError: Cannot read property 'index' of undefined ``

There is probably some better way to solve this problem, but this fixes it for us at least.
Hmm...that change alone probably isn't good, since it will traverse into submenus. I don't think we've spent any time thinking about how this should behave with submenus.