Cleans up header order/grouping for consistency: associated header, C/C++ system/standard library headers, library headers, platform-specific #includes.
Adds <cstring> where strlen, memcpy are being used: there are a bunch of places we use them transitively.
Applies linter-required cleanups. Disables linter on one file due to included RapidJson header. See https://github.com/flutter/flutter/issues/65676
This patch does not cover flutter/shell/platform/darwin. There's a separate, slightly more intensive cleanup for those in progress.
- Add the functionality to merge and unmerge MessageLoopTaskQueues
This introduces a notion of a "owning" and "subsumed" queue ids.
Owning queue will take care of the tasks submitted to both that and it's
subsumed queue.
- The tasks submitted still maintain the queue affinity
- Same for the task observers
- Also adds MergedQueuesRunner which grabs both the locks owner
and subsumed queues in RAII fashion.
- Also use task queue id to verify if we are running
in the same thread.
- This is to enable merging the backed message loop task
queues to enable dynamic thread merging in IOS.