Filter platform specific modules.

Platform specific JS modules are filtered when creating
cordova_plugins.js and copying the plugin resources. Also fixes a typo
on constant name
Collect js-module to its own implementation

Introduce JSModuleAction that collects all the js-module related
handling to a single location for all platforms. Also adds the missing
define to js content generation.