Fix data race on read/write _instance variable in ModuleData class
Fix data race on read/write _instance variable in ModuleData class

Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [ ] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.

What existing problem does the pull request solve?
XCode  [Thread Sanitizer](https://clang.llvm.org/docs/ThreadSanitizer.html) find race condition while read/write `_instance` variable in RCTModuleData class. A bridge can check `hasInstance` method while instance writes.

All tests passed on my device.
These changes remove data race, you can turn it in scheme configuration ![](https://www.shinobicontrols.com/wp-content/uploads/2016/08/Enable_Sanitizer.png)
Closes https://github.com/facebook/react-native/pull/13757

Differential Revision: D4994041

Pulled By: javache

fbshipit-source-id: 631cd59bbcbde193937d8baf8358ff6868717a2e

cdlewis/react-native,Livyli/react-native,gilesvangruisen/react-native,cdlewis/react-native,cpunion/react-native,makadaw/react-native,mironiasty/react-native,Ehesp/react-native,kesha-antonov/react-native,exponentjs/react-native,mironiasty/react-native,makadaw/react-native,rickbeerendonk/react-native,formatlos/react-native,chnfeeeeeef/react-native,chnfeeeeeef/react-native,kesha-antonov/react-native,exponent/react-native,hoangpham95/react-native,jevakallio/react-native,exponentjs/react-native,jevakallio/react-native,Guardiannw/react-native,ptmt/react-native-macos,hoangpham95/react-native,ptmt/react-native-macos,tszajna0/react-native,kesha-antonov/react-native,aljs/react-native,aljs/react-native,Bhullnatik/react-native,shrutic123/react-native,forcedotcom/react-native,Bhullnatik/react-native,formatlos/react-native,brentvatne/react-native,rickbeerendonk/react-native,myntra/react-native,dikaiosune/react-native,skevy/react-native,kesha-antonov/react-native,Guardiannw/react-native,tszajna0/react-native,shrutic123/react-native,hoangpham95/react-native,chnfeeeeeef/react-native,jevakallio/react-native,cpunion/react-native,brentvatne/react-native,Ehesp/react-native,cdlewis/react-native,gilesvangruisen/react-native,Bhullnatik/react-native,peterp/react-native,gilesvangruisen/react-native,skevy/react-native,doochik/react-native,myntra/react-native,exponent/react-native,hoangpham95/react-native,gilesvangruisen/react-native,tszajna0/react-native,Bhullnatik/react-native,cpunion/react-native,dikaiosune/react-native,rickbeerendonk/react-native,javache/react-native,PlexChat/react-native,pandiaraj44/react-native,doochik/react-native,cpunion/react-native,janicduplessis/react-native,thotegowda/react-native,doochik/react-native,brentvatne/react-native,cdlewis/react-native,farazs/react-native,jevakallio/react-native,peterp/react-native,pandiaraj44/react-native,pandiaraj44/react-native,rickbeerendonk/react-native,forcedotcom/react-native,dikaiosune/react-native,exponent/react-native,exponent/react-native,negativetwelve/react-native,exponentjs/react-native,hoangpham95/react-native,frantic/react-native,forcedotcom/react-native,rickbeerendonk/react-native,aljs/react-native,exponentjs/react-native,facebook/react-native,jasonnoahchoi/react-native,Guardiannw/react-native,farazs/react-native,aljs/react-native,cdlewis/react-native,pandiaraj44/react-native,peterp/react-native,chnfeeeeeef/react-native,jasonnoahchoi/react-native,gilesvangruisen/react-native,PlexChat/react-native,janicduplessis/react-native,brentvatne/react-native,hammerandchisel/react-native,cpunion/react-native,facebook/react-native,jasonnoahchoi/react-native,dikaiosune/react-native,facebook/react-native,arthuralee/react-native,exponentjs/react-native,myntra/react-native,ptmt/react-native-macos,exponent/react-native,Guardiannw/react-native,rickbeerendonk/react-native,negativetwelve/react-native,Ehesp/react-native,chnfeeeeeef/react-native,javache/react-native,gilesvangruisen/react-native,rickbeerendonk/react-native,kesha-antonov/react-native,exponent/react-native,formatlos/react-native,Ehesp/react-native,cpunion/react-native,Guardiannw/react-native,formatlos/react-native,Bhullnatik/react-native,dikaiosune/react-native,forcedotcom/react-native,shrutic123/react-native,exponentjs/react-native,hoangpham95/react-native,tszajna0/react-native,farazs/react-native,Guardiannw/react-native,cdlewis/react-native,farazs/react-native,hoangpham95/react-native,janicduplessis/react-native,Livyli/react-native,Livyli/react-native,formatlos/react-native,makadaw/react-native,skevy/react-native,Bhullnatik/react-native,aljs/react-native,thotegowda/react-native,forcedotcom/react-native,shrutic123/react-native,dikaiosune/react-native,kesha-antonov/react-native,mironiasty/react-native,Guardiannw/react-native,mironiasty/react-native,Ehesp/react-native,negativetwelve/react-native,formatlos/react-native,jevakallio/react-native,ptmt/react-native-macos,facebook/react-native,javache/react-native,makadaw/react-native,doochik/react-native,farazs/react-native,negativetwelve/react-native,skevy/react-native,chnfeeeeeef/react-native,skevy/react-native,jasonnoahchoi/react-native,Livyli/react-native,arthuralee/react-native,janicduplessis/react-native,aljs/react-native,dikaiosune/react-native,chnfeeeeeef/react-native,farazs/react-native,makadaw/react-native,formatlos/react-native,negativetwelve/react-native,gilesvangruisen/react-native,PlexChat/react-native,formatlos/react-native,frantic/react-native,cdlewis/react-native,facebook/react-native,negativetwelve/react-native,exponentjs/react-native,skevy/react-native,aljs/react-native,jasonnoahchoi/react-native,hammerandchisel/react-native,facebook/react-native,exponent/react-native,peterp/react-native,arthuralee/react-native,exponentjs/react-native,pandiaraj44/react-native,Livyli/react-native,jevakallio/react-native,dikaiosune/react-native,myntra/react-native,facebook/react-native,doochik/react-native,hammerandchisel/react-native,jevakallio/react-native,hammerandchisel/react-native,shrutic123/react-native,doochik/react-native,frantic/react-native,Ehesp/react-native,forcedotcom/react-native,hoastoolshop/react-native,hoangpham95/react-native,myntra/react-native,Bhullnatik/react-native,PlexChat/react-native,kesha-antonov/react-native,hoastoolshop/react-native,chnfeeeeeef/react-native,ptmt/react-native-macos,ptmt/react-native-macos,shrutic123/react-native,peterp/react-native,hoastoolshop/react-native,janicduplessis/react-native,hammerandchisel/react-native,kesha-antonov/react-native,aljs/react-native,mironiasty/react-native,hoastoolshop/react-native,farazs/react-native,jasonnoahchoi/react-native,Livyli/react-native,kesha-antonov/react-native,brentvatne/react-native,facebook/react-native,doochik/react-native,PlexChat/react-native,doochik/react-native,gilesvangruisen/react-native,cdlewis/react-native,makadaw/react-native,Ehesp/react-native,peterp/react-native,pandiaraj44/react-native,forcedotcom/react-native,rickbeerendonk/react-native,formatlos/react-native,tszajna0/react-native,shrutic123/react-native,tszajna0/react-native,javache/react-native,javache/react-native,thotegowda/react-native,PlexChat/react-native,myntra/react-native,myntra/react-native,negativetwelve/react-native,mironiasty/react-native,farazs/react-native,PlexChat/react-native,rickbeerendonk/react-native,pandiaraj44/react-native,janicduplessis/react-native,makadaw/react-native,hoastoolshop/react-native,pandiaraj44/react-native,jasonnoahchoi/react-native,negativetwelve/react-native,mironiasty/react-native,ptmt/react-native-macos,brentvatne/react-native,mironiasty/react-native,hoastoolshop/react-native,brentvatne/react-native,forcedotcom/react-native,cpunion/react-native,thotegowda/react-native,tszajna0/react-native,makadaw/react-native,jasonnoahchoi/react-native,thotegowda/react-native,Bhullnatik/react-native,hoastoolshop/react-native,cpunion/react-native,facebook/react-native,shrutic123/react-native,hoastoolshop/react-native,hammerandchisel/react-native,myntra/react-native,Guardiannw/react-native,hammerandchisel/react-native,jevakallio/react-native,thotegowda/react-native,ptmt/react-native-macos,janicduplessis/react-native,farazs/react-native,exponent/react-native,brentvatne/react-native,skevy/react-native,Livyli/react-native,frantic/react-native,myntra/react-native,frantic/react-native,janicduplessis/react-native,thotegowda/react-native,PlexChat/react-native,hammerandchisel/react-native,brentvatne/react-native,peterp/react-native,tszajna0/react-native,Ehesp/react-native,thotegowda/react-native,negativetwelve/react-native,doochik/react-native,arthuralee/react-native,javache/react-native,javache/react-native,peterp/react-native,arthuralee/react-native,skevy/react-native,mironiasty/react-native,makadaw/react-native,javache/react-native,javache/react-native,Livyli/react-native,jevakallio/react-native,cdlewis/react-native