Optional externals in amd use globals instead of an explicit dependency

There isn't any mechanism in the amdjs spec to provide optional
dependancies (although a requirejs loader plugin could do that, it's not
standard). The best approach found was knockout's optional dependancy on
jquery, for which it doesn't use require, it only uses globals.

This solution will need to be improved for use of requirejs/amd in
commonjs environments, and could be toggled with a flag.
add 'umd2' libraryTarget for optional amd dependancies as globals
Update ExternalModule.js for umd2
Merge remote-tracking branch 'origin/master' into optional-require-as-global

Conflicts:
	lib/UmdMainTemplatePlugin.js
Merge remote-tracking branch 'origin/master' into optional-require-as-global

Conflicts:
	test/cases/parsing/extract-amd/index.js
Merged PR #362
code style fixes
additional test case for umd2
update versions
error when HMR is not enabled but entry added
expose sourceMaps flag to loaders
1.4.0-beta1