Fix to prevent hung gestures when browser dont trigger touchend

Fixes the problem with gestures which dont get ended when the browser
dont trigger touchend but triggers mouseup.
Code style fixes
Merge pull request #42 from edvard-erlandsson/gh-pages

Fix to prevent hung gestures when browser dont trigger touchend