Ensure checkToggleView() fires at appropriate time

Resolves bug 61400. MobileContext::checkToggleView() was firing after
the first time shouldDisplayMobileView() did, rendering it partly
impotent. Now it will fire just before
shouldDisplayMobileViewInternal(), ensuring it is properly honored.

Also adds logic to remember whether or not the view has already been
toggled, in order to (hackishly) prevent the possibility of infinite
recursion. Ultimately, this ought to be fixed by rearchitecting how
MobileContext::checkToggleView() works and gets called, but this should
at least alleviate this annoying bug for now.

Bug: 61400
Change-Id: Id9831bff48a1f8d11aac14e6d2cdfa7bb5ca17c1
Merge "Ensure checkToggleView() fires at appropriate time"