Delay changing state of added fragments until all executed.

Bug 34963118

When popping multiple transactions, all added fragments
should wait until all transactions are executed before
moving their states to the final state.

This CL brings back the behavior of executing all operations
first before changing the state of added fragments. This means
that intermediate fragments won't be created when popping.

Test: gradlew connectedCheck in fragment

Change-Id: I45a8c0319794e20f08559fb63cafbb84024c9a45
3 files changed