Bug 1024433 - Update displayedApp atom to handle activityWindows

Since we are allowed to have frontWindow have another frontWindow, what you need to do is:
traverse app.frontWindow until you find it's not active.