* [ASDisplayNode] Convert isSynchronous to an Objective-C atomic BOOL.
This reduces lock contention, and should also fix a very rarely seen deadlock.
* [ASDisplayNode] Implement a std::atomic-based flag system for superb performance
Although Objective-C atomics are equally fast, or better that std::atomic when
access through method calls, for the most intense use cases it is best to avoid
method calls entirely.
In ASDisplayNode, we could benefit significantly from avoiding both method calls
(already true today) but also avoid locking the mutex, for both CPU and contention
gains.
There will still be many methods that need locking for transactional
consistency - however, there are currently dozens of accessor methods that could
avoid frequent lock / unlock cycles with use of atomics, and other usages of the
ivars directly where locking could be delayed until after early-return conditions
are checked and passed.
Although apps could handle this before by setting the view's property in didLoad, it's
useful to bridge this property for setting during off-main initialization.
This change also makes RTL fully functional / automatic for Yoga layout users.
* Add a thread-safe layoutIfNeeded implementation to ASDisplayNode
* Trigger a layout pass when a display node enters preload state
- This ensures that all the subnodes have the correct size to preload their content.
* ASCollectionNode to trigger its initial data load when it enters preload state
* Minor change in _ASCollectionViewCell
* Layout sublayouts before dispatch to main for subclass hooks
* Update comments
* Don't wait until updates are committed when the collection node enters display state
* Same deal for table node
* Explain the layout trigger in ASDisplayNode