Improved selection events and handling for preserving the selection when the last element gets deleted

Thanks for making this project available.  Here are 3 small improvements:

1) A small fix to be compatible with IE8 and lower
2) Improved handling for the selectionChanged event to avoid it firing too many times or occasionally not firing at all (when re-rendering)
3) Preserving the selection by offset when the last item is deleted.  The selection is already preserved when an item is deleted in the middle, but if the last item is deleted, then the new last item should be selected.

I have included tests for all the changes (except the IE8 one).

Please let me know if you have any questions.