Fix issue with race when updating/using layout algorithm.

- Prevent accessing the same layout algorithm from the dummy stack view
  from multiple threads, instead use a separate layout algorithm only used
  when preloading from the background.
- Removed some unused variables

Bug: 64363645
Test: Use recents and verify it still preloads the right number of tasks
Change-Id: I3fb81df4af451ab4ce43b33ace88156f22a6bced
2 files changed