Fix IME snapshot missing to remove by 2 consecutive creation calls

There is a timing could happen to create another new IME snapshot
before recents animation finish, so system lost the previous
one's reference and never remove it.

Ensure removing the obsoleted IME snapshot before we create a new one.

Fix: 224664116
Test: atest DisplayContentTests#\
    testShowImeScreenshot_removeCurSnapshotBeforeCreateNext
Change-Id: I3927557453317e9beaab0d5995d6d415d09bb05d
2 files changed