Stylus gestures features (2/2)

Forward-port of http://review.cyanogenmod.com/#/c/18613/6
to JB.

Change-Id: I7a1521c8368971d473dc7ceae4ede0175fa87040