Optimized the canRecognize/recognizeGesture logic.

I noticed that the canRecognize and recognizeGesture methods were both gathering a list of gestures from the hierarchy and checking almost the same things.  In a scene with a lot of objects with gestures, this was causing a bit of lag.  I re-wrote the logic to grab the hierarchy once but perform the same operations.