Logic: Speed up recognizing with testing last frame at first.

git-tfs-id: [https://tfs.codeplex.com:443/tfs/TFS15]$/Atomix;C41228
Gestures: Use VM for gestures.

git-tfs-id: [https://tfs.codeplex.com:443/tfs/TFS15]$/Atomix;C41229