Move non-manifest stuff out of appsv2.patch.
This simplifies the task of adding new Apps V2 functionality and should reduce the need to update the patch when JS changes are made.
The change is mostly mechanical, with the exception of a couple of places where the code being patched was run before remoting.init, which is where I've put the isAppsV2 initialization. Since order of execution of code defined at top-level in Javascript is a tricky topic, I've removed most of it, leaving just a 'load' event listener, which is the recommended approach.
BUG=134213
R=lambroslambrou@chromium.org
Review URL: https://codereview.chromium.org/
19522007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213679 0039d316-1c4b-4281-b951-d872f2087c98