Various refactorings for multi-touch gesture processing code
Various refactorings for multi-touch gesture processing code

* Hoisting variable declarations
* Moving calculations closer to where they are used
* Better variable names
* Combining nested if statements

jstrait/webgl-city,jstrait/webgl-city