Improve handling of popup window exit when host window goes away

- Exit immediately if the anchor root is already detached
- End ongoing transition if anchor root is detached while exiting

Bug: 25691021
Change-Id: I8f9e721fba965060dc830ab3b674526def53f4ad
1 file changed