make yoga threadsafe (#852)
make yoga threadsafe (#852)

Summary:
Continuing https://github.com/facebook/yoga/pull/791
nokia6686 is a former member of our team, so we are trying to pick up what he left and carry out the pull request.
# Solution
Improved from previous solution with jpap's suggestions.
2. Passing ```gDepth``` and ```gCurrentGenerationCount``` (renamed to **_depth_** and **_generationCount_** respectively) between function calls that stem from ```YGNodeCalculateLayout```.
In ```YGNodeCalculateLayout```, pass ```depth``` as value 0, to indicate the root depth.
Pull Request resolved: https://github.com/facebook/yoga/pull/852

Reviewed By: SidharthGuglani

Differential Revision: D15537450

Pulled By: davidaurelio

fbshipit-source-id: 338f51383591ba27702ebe759f6c47c2dede3530

facebook/react-native,arthuralee/react-native,hammerandchisel/react-native,janicduplessis/react-native,pandiaraj44/react-native,myntra/react-native,hoangpham95/react-native,janicduplessis/react-native,arthuralee/react-native,javache/react-native,myntra/react-native,myntra/react-native,myntra/react-native,janicduplessis/react-native,arthuralee/react-native,myntra/react-native,hoangpham95/react-native,facebook/react-native,janicduplessis/react-native,janicduplessis/react-native,janicduplessis/react-native,javache/react-native,pandiaraj44/react-native,facebook/react-native,exponentjs/react-native,javache/react-native,hammerandchisel/react-native,hoangpham95/react-native,hammerandchisel/react-native,myntra/react-native,pandiaraj44/react-native,hoangpham95/react-native,janicduplessis/react-native,exponentjs/react-native,arthuralee/react-native,exponent/react-native,exponent/react-native,hoangpham95/react-native,exponent/react-native,facebook/react-native,javache/react-native,exponentjs/react-native,javache/react-native,exponent/react-native,facebook/react-native,facebook/react-native,exponent/react-native,hammerandchisel/react-native,hammerandchisel/react-native,hammerandchisel/react-native,exponentjs/react-native,javache/react-native,exponentjs/react-native,myntra/react-native,exponent/react-native,hoangpham95/react-native,facebook/react-native,pandiaraj44/react-native,hoangpham95/react-native,exponent/react-native,javache/react-native,arthuralee/react-native,pandiaraj44/react-native,pandiaraj44/react-native,javache/react-native,exponent/react-native,hoangpham95/react-native,facebook/react-native,myntra/react-native,pandiaraj44/react-native,hammerandchisel/react-native,myntra/react-native,janicduplessis/react-native,facebook/react-native,hammerandchisel/react-native,javache/react-native,exponentjs/react-native,exponentjs/react-native,exponentjs/react-native,pandiaraj44/react-native