PanResponder should not hold stale handle for interaction.
PanResponder should not hold stale handle for interaction.

Summary:
For now, `PanResponder.create()` return a new object which may hold a handle
for interaction. The handle is created when the gesture starts, and it's cleared
when the gesture finishes.

However, the handle may become stale cause the owner (view) is removed or
re-rendered before the gesture finishes, which leaves InteractionManager
with handles that can never be removed.

In some cases, this blocks the app that waits for InteractionManager to
be idle and having leaky handles prevents InteractionManager from being idle
again.

The fix is to move the handle from the instance to the static variable, and
we'd clear it whenever a gesture finishes.

Reviewed By: sahrens

Differential Revision: D3550699

fbshipit-source-id: 412e9046a6cd9be34b3a7d572258008016a29f41

clozr/react-native,aaron-goshine/react-native,Maxwell2022/react-native,facebook/react-native,exponentjs/react-native,shrutic123/react-native,exponent/react-native,tadeuzagallo/react-native,peterp/react-native,christopherdro/react-native,DanielMSchmidt/react-native,Maxwell2022/react-native,gitim/react-native,Swaagie/react-native,Bhullnatik/react-native,shrutic/react-native,tszajna0/react-native,exponentjs/react-native,rickbeerendonk/react-native,csatf/react-native,foghina/react-native,facebook/react-native,satya164/react-native,aaron-goshine/react-native,DannyvanderJagt/react-native,arthuralee/react-native,charlesvinette/react-native,Guardiannw/react-native,farazs/react-native,dikaiosune/react-native,forcedotcom/react-native,thotegowda/react-native,doochik/react-native,myntra/react-native,janicduplessis/react-native,formatlos/react-native,aljs/react-native,Ehesp/react-native,naoufal/react-native,Maxwell2022/react-native,Andreyco/react-native,esauter5/react-native,Guardiannw/react-native,nickhudkins/react-native,tarkus/react-native-appletv,shrutic/react-native,Maxwell2022/react-native,doochik/react-native,forcedotcom/react-native,DannyvanderJagt/react-native,Bhullnatik/react-native,exponent/react-native,jevakallio/react-native,brentvatne/react-native,formatlos/react-native,shrutic/react-native,DannyvanderJagt/react-native,mironiasty/react-native,cosmith/react-native,CodeLinkIO/react-native,ankitsinghania94/react-native,cosmith/react-native,PlexChat/react-native,jaggs6/react-native,Andreyco/react-native,xiayz/react-native,mironiasty/react-native,CodeLinkIO/react-native,catalinmiron/react-native,aljs/react-native,xiayz/react-native,jasonnoahchoi/react-native,hoangpham95/react-native,tgoldenberg/react-native,exponentjs/react-native,gre/react-native,jasonnoahchoi/react-native,htc2u/react-native,kesha-antonov/react-native,javache/react-native,Maxwell2022/react-native,callstack-io/react-native,jevakallio/react-native,rickbeerendonk/react-native,forcedotcom/react-native,javache/react-native,hoastoolshop/react-native,hoastoolshop/react-native,brentvatne/react-native,naoufal/react-native,cdlewis/react-native,htc2u/react-native,Ehesp/react-native,Ehesp/react-native,aaron-goshine/react-native,PlexChat/react-native,gitim/react-native,exponentjs/react-native,imDangerous/react-native,jevakallio/react-native,gitim/react-native,foghina/react-native,cpunion/react-native,satya164/react-native,satya164/react-native,negativetwelve/react-native,Ehesp/react-native,hammerandchisel/react-native,tarkus/react-native-appletv,tsjing/react-native,peterp/react-native,Livyli/react-native,tsjing/react-native,salanki/react-native,christopherdro/react-native,arthuralee/react-native,browniefed/react-native,shrutic123/react-native,imjerrybao/react-native,orenklein/react-native,esauter5/react-native,facebook/react-native,hoangpham95/react-native,eduardinni/react-native,makadaw/react-native,Swaagie/react-native,tsjing/react-native,wenpkpk/react-native,cdlewis/react-native,catalinmiron/react-native,shrutic123/react-native,farazs/react-native,exponent/react-native,javache/react-native,DanielMSchmidt/react-native,CodeLinkIO/react-native,Swaagie/react-native,tgoldenberg/react-native,christopherdro/react-native,imDangerous/react-native,charlesvinette/react-native,hoangpham95/react-native,happypancake/react-native,jevakallio/react-native,jadbox/react-native,pandiaraj44/react-native,janicduplessis/react-native,hammerandchisel/react-native,ndejesus1227/react-native,ndejesus1227/react-native,happypancake/react-native,farazs/react-native,shrutic123/react-native,alin23/react-native,peterp/react-native,tarkus/react-native-appletv,salanki/react-native,janicduplessis/react-native,happypancake/react-native,dikaiosune/react-native,javache/react-native,imDangerous/react-native,farazs/react-native,thotegowda/react-native,imDangerous/react-native,kesha-antonov/react-native,wenpkpk/react-native,frantic/react-native,Ehesp/react-native,negativetwelve/react-native,charlesvinette/react-native,myntra/react-native,Swaagie/react-native,imjerrybao/react-native,gilesvangruisen/react-native,mrspeaker/react-native,PlexChat/react-native,wenpkpk/react-native,mironiasty/react-native,csatf/react-native,callstack-io/react-native,cdlewis/react-native,rickbeerendonk/react-native,eduardinni/react-native,naoufal/react-native,doochik/react-native,tgoldenberg/react-native,ankitsinghania94/react-native,brentvatne/react-native,PlexChat/react-native,adamjmcgrath/react-native,chnfeeeeeef/react-native,Guardiannw/react-native,adamjmcgrath/react-native,pandiaraj44/react-native,christopherdro/react-native,cdlewis/react-native,skevy/react-native,clozr/react-native,jaggs6/react-native,hoangpham95/react-native,shrutic123/react-native,ankitsinghania94/react-native,tszajna0/react-native,chnfeeeeeef/react-native,lprhodes/react-native,gilesvangruisen/react-native,jevakallio/react-native,charlesvinette/react-native,charlesvinette/react-native,skevy/react-native,tgoldenberg/react-native,mrspeaker/react-native,jadbox/react-native,jasonnoahchoi/react-native,mrspeaker/react-native,shrutic/react-native,orenklein/react-native,xiayz/react-native,mrspeaker/react-native,lprhodes/react-native,ptmt/react-native-macos,ptomasroos/react-native,Bhullnatik/react-native,cpunion/react-native,DannyvanderJagt/react-native,brentvatne/react-native,janicduplessis/react-native,tsjing/react-native,negativetwelve/react-native,csatf/react-native,wenpkpk/react-native,cdlewis/react-native,doochik/react-native,javache/react-native,tgoldenberg/react-native,hoangpham95/react-native,tadeuzagallo/react-native,jasonnoahchoi/react-native,htc2u/react-native,Maxwell2022/react-native,negativetwelve/react-native,tsjing/react-native,hoastoolshop/react-native,rickbeerendonk/react-native,chnfeeeeeef/react-native,pandiaraj44/react-native,nickhudkins/react-native,DannyvanderJagt/react-native,tadeuzagallo/react-native,farazs/react-native,negativetwelve/react-native,browniefed/react-native,makadaw/react-native,xiayz/react-native,kesha-antonov/react-native,wenpkpk/react-native,orenklein/react-native,aljs/react-native,wenpkpk/react-native,dikaiosune/react-native,shrutic123/react-native,negativetwelve/react-native,imDangerous/react-native,cdlewis/react-native,doochik/react-native,skevy/react-native,Purii/react-native,arthuralee/react-native,imDangerous/react-native,htc2u/react-native,formatlos/react-native,Livyli/react-native,orenklein/react-native,gilesvangruisen/react-native,Bhullnatik/react-native,makadaw/react-native,csatf/react-native,PlexChat/react-native,myntra/react-native,ptmt/react-native-macos,formatlos/react-native,kesha-antonov/react-native,clozr/react-native,ptmt/react-native-macos,callstack-io/react-native,PlexChat/react-native,foghina/react-native,peterp/react-native,DanielMSchmidt/react-native,lprhodes/react-native,adamjmcgrath/react-native,mironiasty/react-native,adamjmcgrath/react-native,csatf/react-native,makadaw/react-native,arthuralee/react-native,hoangpham95/react-native,chnfeeeeeef/react-native,hammerandchisel/react-native,tszajna0/react-native,CodeLinkIO/react-native,salanki/react-native,aaron-goshine/react-native,rickbeerendonk/react-native,Guardiannw/react-native,janicduplessis/react-native,exponentjs/react-native,jadbox/react-native,hoastoolshop/react-native,happypancake/react-native,eduardinni/react-native,gre/react-native,clozr/react-native,hammerandchisel/react-native,happypancake/react-native,jadbox/react-native,chnfeeeeeef/react-native,ptmt/react-native-macos,aaron-goshine/react-native,Bhullnatik/react-native,chnfeeeeeef/react-native,makadaw/react-native,tsjing/react-native,formatlos/react-native,alin23/react-native,shrutic/react-native,brentvatne/react-native,jevakallio/react-native,salanki/react-native,myntra/react-native,facebook/react-native,jasonnoahchoi/react-native,Bhullnatik/react-native,makadaw/react-native,jadbox/react-native,exponentjs/react-native,adamjmcgrath/react-native,hoastoolshop/react-native,doochik/react-native,myntra/react-native,naoufal/react-native,javache/react-native,ankitsinghania94/react-native,foghina/react-native,xiayz/react-native,dikaiosune/react-native,Andreyco/react-native,esauter5/react-native,negativetwelve/react-native,browniefed/react-native,Purii/react-native,charlesvinette/react-native,aaron-goshine/react-native,christopherdro/react-native,ndejesus1227/react-native,jaggs6/react-native,happypancake/react-native,rickbeerendonk/react-native,gre/react-native,formatlos/react-native,naoufal/react-native,htc2u/react-native,formatlos/react-native,clozr/react-native,rickbeerendonk/react-native,gitim/react-native,negativetwelve/react-native,ptomasroos/react-native,gilesvangruisen/react-native,lprhodes/react-native,csatf/react-native,janicduplessis/react-native,catalinmiron/react-native,naoufal/react-native,myntra/react-native,tgoldenberg/react-native,aaron-goshine/react-native,tszajna0/react-native,esauter5/react-native,exponent/react-native,orenklein/react-native,Ehesp/react-native,Guardiannw/react-native,adamjmcgrath/react-native,naoufal/react-native,CodeLinkIO/react-native,arthuralee/react-native,nickhudkins/react-native,tarkus/react-native-appletv,Andreyco/react-native,hammerandchisel/react-native,ptomasroos/react-native,charlesvinette/react-native,alin23/react-native,farazs/react-native,gitim/react-native,aljs/react-native,xiayz/react-native,kesha-antonov/react-native,gilesvangruisen/react-native,eduardinni/react-native,frantic/react-native,makadaw/react-native,exponent/react-native,imjerrybao/react-native,Andreyco/react-native,mironiasty/react-native,htc2u/react-native,cosmith/react-native,cpunion/react-native,hoastoolshop/react-native,Bhullnatik/react-native,christopherdro/react-native,mironiasty/react-native,doochik/react-native,nickhudkins/react-native,browniefed/react-native,wenpkpk/react-native,Livyli/react-native,tszajna0/react-native,imjerrybao/react-native,ankitsinghania94/react-native,DanielMSchmidt/react-native,callstack-io/react-native,facebook/react-native,shrutic123/react-native,cosmith/react-native,kesha-antonov/react-native,forcedotcom/react-native,jasonnoahchoi/react-native,gilesvangruisen/react-native,catalinmiron/react-native,jadbox/react-native,gilesvangruisen/react-native,esauter5/react-native,cosmith/react-native,ndejesus1227/react-native,makadaw/react-native,DanielMSchmidt/react-native,ptmt/react-native-macos,Purii/react-native,clozr/react-native,gitim/react-native,Ehesp/react-native,thotegowda/react-native,gre/react-native,peterp/react-native,kesha-antonov/react-native,tadeuzagallo/react-native,cdlewis/react-native,nickhudkins/react-native,thotegowda/react-native,shrutic123/react-native,pandiaraj44/react-native,shrutic/react-native,nickhudkins/react-native,dikaiosune/react-native,jevakallio/react-native,wenpkpk/react-native,brentvatne/react-native,jadbox/react-native,frantic/react-native,alin23/react-native,ankitsinghania94/react-native,tarkus/react-native-appletv,xiayz/react-native,ndejesus1227/react-native,DannyvanderJagt/react-native,cosmith/react-native,callstack-io/react-native,christopherdro/react-native,ndejesus1227/react-native,frantic/react-native,tszajna0/react-native,ptomasroos/react-native,eduardinni/react-native,aljs/react-native,InterfaceInc/react-native,peterp/react-native,csatf/react-native,mrspeaker/react-native,myntra/react-native,imDangerous/react-native,naoufal/react-native,alin23/react-native,clozr/react-native,tarkus/react-native-appletv,janicduplessis/react-native,imjerrybao/react-native,tadeuzagallo/react-native,adamjmcgrath/react-native,skevy/react-native,dikaiosune/react-native,chnfeeeeeef/react-native,brentvatne/react-native,ptmt/react-native-macos,Livyli/react-native,Purii/react-native,tsjing/react-native,farazs/react-native,satya164/react-native,catalinmiron/react-native,forcedotcom/react-native,InterfaceInc/react-native,Livyli/react-native,jaggs6/react-native,Andreyco/react-native,salanki/react-native,aljs/react-native,facebook/react-native,shrutic/react-native,facebook/react-native,gitim/react-native,CodeLinkIO/react-native,pandiaraj44/react-native,foghina/react-native,facebook/react-native,orenklein/react-native,eduardinni/react-native,jaggs6/react-native,thotegowda/react-native,forcedotcom/react-native,happypancake/react-native,imDangerous/react-native,cpunion/react-native,xiayz/react-native,browniefed/react-native,tadeuzagallo/react-native,kesha-antonov/react-native,esauter5/react-native,shrutic/react-native,rickbeerendonk/react-native,imjerrybao/react-native,jaggs6/react-native,ptomasroos/react-native,myntra/react-native,clozr/react-native,tszajna0/react-native,InterfaceInc/react-native,jadbox/react-native,Swaagie/react-native,tarkus/react-native-appletv,htc2u/react-native,peterp/react-native,nickhudkins/react-native,cpunion/react-native,mironiasty/react-native,pandiaraj44/react-native,htc2u/react-native,mrspeaker/react-native,farazs/react-native,brentvatne/react-native,mrspeaker/react-native,salanki/react-native,alin23/react-native,browniefed/react-native,myntra/react-native,facebook/react-native,gitim/react-native,DanielMSchmidt/react-native,jevakallio/react-native,lprhodes/react-native,gre/react-native,tadeuzagallo/react-native,ptomasroos/react-native,cdlewis/react-native,frantic/react-native,formatlos/react-native,browniefed/react-native,aljs/react-native,InterfaceInc/react-native,Andreyco/react-native,jaggs6/react-native,Livyli/react-native,hammerandchisel/react-native,forcedotcom/react-native,ptmt/react-native-macos,satya164/react-native,jasonnoahchoi/react-native,Guardiannw/react-native,mironiasty/react-native,mironiasty/react-native,DanielMSchmidt/react-native,alin23/react-native,thotegowda/react-native,Guardiannw/react-native,catalinmiron/react-native,Livyli/react-native,exponent/react-native,satya164/react-native,catalinmiron/react-native,happypancake/react-native,jevakallio/react-native,cosmith/react-native,chnfeeeeeef/react-native,nickhudkins/react-native,hoastoolshop/react-native,cpunion/react-native,dikaiosune/react-native,hammerandchisel/react-native,ndejesus1227/react-native,brentvatne/react-native,janicduplessis/react-native,negativetwelve/react-native,Maxwell2022/react-native,Purii/react-native,DanielMSchmidt/react-native,exponentjs/react-native,formatlos/react-native,Andreyco/react-native,mrspeaker/react-native,esauter5/react-native,satya164/react-native,Purii/react-native,tgoldenberg/react-native,eduardinni/react-native,skevy/react-native,tsjing/react-native,gre/react-native,rickbeerendonk/react-native,farazs/react-native,christopherdro/react-native,InterfaceInc/react-native,ptomasroos/react-native,salanki/react-native,alin23/react-native,exponent/react-native,jasonnoahchoi/react-native,skevy/react-native,satya164/react-native,imjerrybao/react-native,gre/react-native,hammerandchisel/react-native,cpunion/react-native,doochik/react-native,kesha-antonov/react-native,PlexChat/react-native,csatf/react-native,Maxwell2022/react-native,orenklein/react-native,callstack-io/react-native,Swaagie/react-native,InterfaceInc/react-native,PlexChat/react-native,dikaiosune/react-native,skevy/react-native,tarkus/react-native-appletv,pandiaraj44/react-native,Purii/react-native,exponent/react-native,ankitsinghania94/react-native,ndejesus1227/react-native,aljs/react-native,Swaagie/react-native,charlesvinette/react-native,skevy/react-native,javache/react-native,eduardinni/react-native,lprhodes/react-native,cdlewis/react-native,gilesvangruisen/react-native,tgoldenberg/react-native,tszajna0/react-native,InterfaceInc/react-native,cpunion/react-native,foghina/react-native,esauter5/react-native,Guardiannw/react-native,javache/react-native,Ehesp/react-native,DannyvanderJagt/react-native,peterp/react-native,ptomasroos/react-native,ptmt/react-native-macos,aaron-goshine/react-native,foghina/react-native,cosmith/react-native,DannyvanderJagt/react-native,hoangpham95/react-native,CodeLinkIO/react-native,thotegowda/react-native,CodeLinkIO/react-native,ankitsinghania94/react-native,browniefed/react-native,forcedotcom/react-native,tadeuzagallo/react-native,callstack-io/react-native,lprhodes/react-native,catalinmiron/react-native,orenklein/react-native,gre/react-native,salanki/react-native,pandiaraj44/react-native,thotegowda/react-native,InterfaceInc/react-native,javache/react-native,Bhullnatik/react-native,exponentjs/react-native,imjerrybao/react-native,lprhodes/react-native,Swaagie/react-native,Purii/react-native,jaggs6/react-native,adamjmcgrath/react-native,hoastoolshop/react-native,hoangpham95/react-native,callstack-io/react-native,doochik/react-native,Livyli/react-native,makadaw/react-native,foghina/react-native