When ever bundle was reloaded, all currently registered screens
where recreated since they were still attached to the react context.
This commit adds, in a very hacky way, means to respond to bundle
reload events.
Turns out the popping a screen while keyboard is
open has no side effects. The issue was in fact
that under some condition, when adding a screen
back after it was previously removed caused the
screens constructor to be called.
This commits prevent startReactApplication from
being called by setting mAttachScheduled flag.
This commit includes two major changes
1. Move all calls to private react-native API to a single class and
change access modifier of the ReactRootView to private.
2. Hide soft keyboard when a view is removed from screen. This
potentially fixes a bug we encountered internally where react
failed to render the shadow DOM properly, when popping a screen
while the soft keyboard was displayed.
When starting new activity after previous activity showed modals
and did not dismiss them. The modal controller still had
registered modals even though we can't go back in the activity stack.