Fix #214: NavBar: currentIndex doesn't always work

When both currentIndex and maxRows are set in the NavBar's constructor,
currentIndex is usually ignored.

The problem is that after the NavBar measures, it sets the height of the
surface which triggers the resize handler. The resize handler sets
currentIndex to 0 thus overriding the value that was passed into the
constructor.

The fix is to only run the resize handler when the NavBar's size really
did change.

Additionally, the NavBarContainer's focus state (including focus,
currentIndex, and scroll position) should be reset when the NavBar is
hidden and then reshown. The NavBarContainer used to fulfill this
requirement indirectly thru its resize handler (the resize handler is
triggered when when the NavBar goes from display="none" to "block"). Now
that the NavBarContainer's resize handler only runs if its viewport's size
has changed since the last measure, we need a more explicit way to reset
the focus state when the NavBar is hidden and then reshown. This
requirement is now fulfilled by calling closeSplitAndReset when NavBar
fires its beforeshow event.