Avoid flicker by finishing recents animation with config change

When finishing recents animation, the surface of closing app
will reparent to the original parent, and then the transition
TRANSIT_NONE executes directly that sets the closing app to
invisible and notify the opening app is ready. If the opening
app is in different orientation, DisplayContent#mWaitingForConfig
will be set. So the next round of surface traversal is skipped
and the invisible state hasn't applied to surface that causes
flicker.

With performing surface placement at the end of finishing recents
animation if there still has unfinished layout, that makes sure
any state changes of the window will be updated to its surface.

Also removed unused parameter recoveringMemory.

Bug: 151727009
Test: Enable fixed rotation transform and gesture navigation,
      swipe to home from a landscape activity.

Change-Id: I322fe376b0fe79ab58cb12ff99fc9749e00ef0c5
8 files changed