bug 976960

* fire cardviewclosed with new stack position but wait for 'appopen' from AppWindowManager to fire before actually hiding the cardswitcher.
* added unit test to ensure that we don't regress this fix.

r=etienne
Merge pull request #16729 from nullaus/bug976960

bug 976960