Stop CxxBridge run loop when bridge is invalidated
Stop CxxBridge run loop when bridge is invalidated

Summary:
This fixes the `testModulesAreDeallocated` test. It was sometimes failing because the bridge's module was still alive. I debugged with the Xcode memory graph and found that the bridge was actually kept alive by a pointer from the NSThread.
By killing the runloop on the thread, the thread will eventually die and thus free the bridge.

One thing I didn't investigate was whether the thread was alive because of it receiving actual messages or just because the run loop was spinning.

Reviewed By: javache

Differential Revision: D5729925

fbshipit-source-id: 304f526129d2c5e137bfd791a6f957f6169b783e

myntra/react-native,arthuralee/react-native,jevakallio/react-native,pandiaraj44/react-native,jevakallio/react-native,cdlewis/react-native,facebook/react-native,hammerandchisel/react-native,kesha-antonov/react-native,hoastoolshop/react-native,dikaiosune/react-native,Bhullnatik/react-native,dikaiosune/react-native,janicduplessis/react-native,jevakallio/react-native,ptmt/react-native-macos,hoastoolshop/react-native,hoangpham95/react-native,Bhullnatik/react-native,exponent/react-native,kesha-antonov/react-native,pandiaraj44/react-native,facebook/react-native,hoastoolshop/react-native,javache/react-native,facebook/react-native,hammerandchisel/react-native,ptmt/react-native-macos,rickbeerendonk/react-native,exponent/react-native,exponentjs/react-native,cdlewis/react-native,rickbeerendonk/react-native,dikaiosune/react-native,hoastoolshop/react-native,janicduplessis/react-native,arthuralee/react-native,jevakallio/react-native,arthuralee/react-native,myntra/react-native,arthuralee/react-native,myntra/react-native,ptmt/react-native-macos,hoangpham95/react-native,jevakallio/react-native,Bhullnatik/react-native,dikaiosune/react-native,javache/react-native,javache/react-native,facebook/react-native,ptmt/react-native-macos,pandiaraj44/react-native,rickbeerendonk/react-native,hammerandchisel/react-native,janicduplessis/react-native,rickbeerendonk/react-native,javache/react-native,javache/react-native,rickbeerendonk/react-native,hoangpham95/react-native,exponentjs/react-native,exponent/react-native,myntra/react-native,dikaiosune/react-native,cdlewis/react-native,jevakallio/react-native,facebook/react-native,cdlewis/react-native,javache/react-native,Bhullnatik/react-native,rickbeerendonk/react-native,ptmt/react-native-macos,facebook/react-native,myntra/react-native,pandiaraj44/react-native,javache/react-native,hammerandchisel/react-native,dikaiosune/react-native,janicduplessis/react-native,rickbeerendonk/react-native,frantic/react-native,cdlewis/react-native,Bhullnatik/react-native,hoangpham95/react-native,exponentjs/react-native,cdlewis/react-native,pandiaraj44/react-native,exponent/react-native,hammerandchisel/react-native,exponentjs/react-native,frantic/react-native,frantic/react-native,hoangpham95/react-native,arthuralee/react-native,kesha-antonov/react-native,hammerandchisel/react-native,hoastoolshop/react-native,pandiaraj44/react-native,kesha-antonov/react-native,dikaiosune/react-native,myntra/react-native,jevakallio/react-native,exponent/react-native,exponent/react-native,pandiaraj44/react-native,hoangpham95/react-native,exponentjs/react-native,hoastoolshop/react-native,facebook/react-native,ptmt/react-native-macos,Bhullnatik/react-native,rickbeerendonk/react-native,frantic/react-native,kesha-antonov/react-native,exponentjs/react-native,Bhullnatik/react-native,pandiaraj44/react-native,jevakallio/react-native,kesha-antonov/react-native,exponent/react-native,myntra/react-native,hoangpham95/react-native,exponentjs/react-native,janicduplessis/react-native,exponent/react-native,myntra/react-native,cdlewis/react-native,myntra/react-native,ptmt/react-native-macos,hammerandchisel/react-native,rickbeerendonk/react-native,javache/react-native,facebook/react-native,frantic/react-native,javache/react-native,jevakallio/react-native,janicduplessis/react-native,cdlewis/react-native,exponentjs/react-native,hoangpham95/react-native,ptmt/react-native-macos,Bhullnatik/react-native,dikaiosune/react-native,janicduplessis/react-native,kesha-antonov/react-native,facebook/react-native,janicduplessis/react-native,hoastoolshop/react-native,hammerandchisel/react-native,kesha-antonov/react-native,kesha-antonov/react-native,cdlewis/react-native,hoastoolshop/react-native