Detect the transitionend event from the window when possible.

Safari 7 removes the prefix from the transitionend event.   Webkit populates the window with `ontransitionend`, so we can key off of that for proper detection.  Fixes #1204.

Tested on: Chrome 29, Firefox 24, IE 10, Safari 6 (desktop and iOS6), Safari 7 (iOS).