[CB-4004] Add base64 encoding utility function
(cherry picked from commit ff218213e141c7a42f0ee6b7bce30ef4858f016f)
CB 4004: Adding base64 encoding for array buffers, while removing the String expansion
(cherry picked from commit 5ba835cf64a50f48dcdc8ced49fed1a714c098cc)
Use new base64 method for iOS and OSX as well
(cherry picked from commit 0e89b601a586877a7ff3308f75e41b6360d9ec12)
Change plugin_loader.js into a regular module that is called from bootstrap

Instead of being hardcoded into packager.js.
(cherry picked from commit 5686a320aa690e52b2c363cba1f8792112088f52)
[all] [CB-4022] Defer running of <runs> modules until after all scripts are loaded.
(cherry picked from commit 0c80083d289681616480054b84102758e9ed20bd)
[All][CB-4016] plugin loading uses script injection to load cordova_plugins.js
(cherry picked from commit 0ce47184000f9187654e1532265b9c9ae0c93330)
[All] patch, in case console.warn is not defined
(cherry picked from commit 984b1f1e26b12af2ad2acda96074341853ea8706)
Fix a failure case in pluginloader where an onerror callback was not being set.

Probably is never triggered... Might as well though.
(cherry picked from commit c2a6ba1cb8c7d004b44bb6b825017f30bf403d54)
[All] remove mistaken windows only debug message
(cherry picked from commit 52ce7be6dc835f83c324cd01c7539a1d164e8b5d)
[all] Fix pluginloader never finishing (broken by recent commit)
(cherry picked from commit 553681f0adf55c8928be8d72164f22e17323f496)
catch exception for missing or invalid file path
(cherry picked from commit 87cc336cb59f8df559a201fdb1e2a6251b57a06b)
[CB-4187] Fix start-up stalling when no plugins are installed.
(cherry picked from commit e74c3f136dae6d5f38ce3370a1927b58ab47a0fc)
[CB-4004] Fix Android JS bridge break caused by bad rebase before 5ba835c
(cherry picked from commit 50f8dbb030e0eba700b50dc00188468467e1f9a4)
[CB-4187] Fix the fix for start-up when no plugins are installed.
(cherry picked from commit ab2cb2cf6d3839373a0fa1372f2383fd17b93ecb)
jshint cleanup (sorry im ocd)
(cherry picked from commit d716e31b39bd39a06f1db80040e2c8a6a78a34e8)
[CB-4420] Add a helper function for resolving relative URLs.

Note that the tests required a newer version of jsdom.
(cherry picked from commit 2ec92f7b412a3bda84e44f156b9b371c9f94a501)
Change Gruntfile to auto-build before running tests
(cherry picked from commit 45baa2cce0c9aa682f77f09a35917f6cd7622720)
Make base64 tests work in browser as well as Node
(cherry picked from commit ee2c1d20c3cc4e5ff9d0aa9e6fa0368a6b6956f6)
[android] Tweak the online bridge to tell native when an event has happened.

This allows the native side to not send excess events.
(cherry picked from commit 1be2876635d2a788270238c4b1cfad200c488e32)
[all] [CB-4725] Export cordova version as "cordova.version"
(cherry picked from commit e2942e162e1db06446d44d0b814ba450eb22a028)