r7 remix version. Includes fixes and improvements from:

- [usmonster] euclidean motion measurements
- [voigtan] viewport, ignoreScroll support
- [lucanos] extended options handler to allow passing of mouseenter and mouseout
- [somatonic] touchend support
- [rowofpixels] jQuery reference consistency

based on r7 original from [briancherne]