Enhanced to support gesture recognizers other than UIPanGestureRecognizer. Enhanced to support animating the movement of a layer that is not the gesture recognizer's view's layer with the movement of the gesture. Refactored.