Notify the Activity layout that the top most Modal was dismissed only
if no other modals are displayed. Currently this event is used as a
`onVisible` event to to the layout. This whole logic can be simplified
when we implement proper screen visibility events.
When ivoking navigation actions such as push, pop etc, instead of
checking modal visibility, check if modal actually contains the given
navigator. This fix alows to change navigation state in screens while
modal is displayed.