Pass along API to callbacks, and set originalEvent

Pass along API as first parameter of all event callbacks, and also set the passed events `originalEvent` property to the event triggered the corresponding resize event i.e. `mouseup` etc.