Optimize MessageHeap siftUp/Down

When sifting up/down, sift other messages down/up as we traverse, and only store the starting message once at the final position.
Essentially instead of swapping messages at every traversal step, we create an empty bubble where we start and sift the bubble, then store the original message at the final bubble position.

Flag: build.RELEASE_PACKAGE_MESSAGEQUEUE_IMPLEMENTATION
Bug: 421623328
Change-Id: Icb72cc46dbb439423960d01eeb9f786ed446d423
1 file changed