Add starting windows while unlocking

- Modify screen capturing logic a bit such that it can also take a
  screenshot when the display is off.
- Also take snapshot when app visibility is changing without
  proper app transition.
- When unlocking, add strating windows for all visible apps.

Test: Unlock phone.
Test: Have an app that sleeps in onStart, make sure unlocking is
instant.
Bug: 31339431
Change-Id: I953ab6cb30d0d264554fd49a46bdc56e23356d13
7 files changed