CB-6954: Share events.js between cordova and plugman

github: close #31
JSHint fixes

Add the following JSHint config to several files that already had some inline
JSHint config. This is part of figuring out the optimal jshint config for us.

/* jshint node:true, bitwise:true, undef:true, trailing:true, quotmark:true,
          indent:4, unused:vars, latedef:nofunc
*/

In some files tweaks to this config were needed. I added them on a separate
line. For example, the tweaks in plugman/install.js are:
laxcomma:true, sub:true, expr:true, asi:true, quotmark:false
CB-6954: Expose the unified events as cordova_lib.events

After events got shared between cordova and plugman, some log messages were
printed multiple times since handlers were registered twice in the cli:
cordova.on(...)
plugman.on(...)
changing it to
events.on(...)
CB-6973: Fix JSHint errors in src/cordova/*.js

Add JSHint config comment in all the files (sometimes with tweaks)
/* jshint node:true, bitwise:true, undef:true, trailing:true, quotmark:true,
          indent:4, unused:vars, latedef:nofunc
*/

JSHint is now happy for all of src/cordova/*.js (not including metadata/*.js).
CB-6973: Add JSHint to npm-test in package.json

 - It runs after jasmine and only if jasmine test was successful.
 - Can be run separately as "npm run jshint".
 - For now only covers src/cordova/*.js not including metadata/*.js
CB-6973: Fix JSHint errors in src/plugman/*.js

Add JSHint config comment in all the files (sometimes with tweaks)
/* jshint node:true, bitwise:true, undef:true, trailing:true, quotmark:true,
          indent:4, unused:vars, latedef:nofunc
*/

JSHint is now happy for both src/cordova/*.js and src/plugman/*.js
not including subdirs.

Use
npm run jshint
to run jshint on all the files that have been fixed so far.
CB-6970 Share win project files manipulation code between cordova and plugman

github: close #32
folder_contents() now ignores .svn folders

.svn folders should not be referenced in the jsproj file. They are already
correctly ignored when copying the www folder, and this causes the build to
fail (since the jsproj references files that cannot be found in www).

github: close #33
CB-6542: Delay creating project until there's some chance that it will succeed

github: close #34
CB-6540 Rephrase Error msg for creating a project inside its template

github: close #35
CB-6973: Fix more JSHint errors
Replace Windows 8 platform with unified Windows platform