[xulrunner] Turn GestureEventListener to FSM