CB-6047 Fix online sometimes getting in a bad state on page transitions.

The online bridge toggles between on & off. Turns out that starting with
Android 4.3, navigation resets the online state, so the code had a 50/50
chance of being caught in the wrong state.

We now forcefully reset the online state on page transitions.

(cherry picked from commit a2f8c9c75b4fa2d0ce787d8b75bf7f161d6699fc)
CB-6761 Fix native->JS bridge ceasing to fire when page changes and online is set to false and the JS loads quickly

(cherry picked from commit 445ddd89fb3269a772978a9860247065e5886249)
CB-7261 Fix setNativeToJsBridgeMode sometimes crashing when switching to ONLINE_EVENT

(cherry picked from commit 41125ea1e2ce9bff3191f57d88c10c277cbb3e94)
Fix JSONStore.init() hangs for Android devices

Fix JSONStore.init() hangs for Android devices
- Cordova RTC work item number: 59273
- Apache Cordova Jira issue:
https://issues.apache.org/jira/browse/CB-6047,
https://issues.apache.org/jira/browse/CB-6761,
https://issues.apache.org/jira/browse/CB-7261
- Markmail or Google Group reference:
- Product PMR: 83770,000,858
- APAR PI31084 (RTC 59375)
- Description: JSONStore.init() hangs is caused by a lack of good
handling on the reset and toggling events
on NativeToJsMessageQueue.java class, the changes applied on this fix
are going to properly handle the Online events,
handling the queue of messages on page transitions, and general
optimization. More information on RTC work item.
Same fix has been applied to Cordova 3.1.0esr.