Update the JS Binding tools for new directory structure.
Add sample code for using plugin by JS script.
Merge pull request #2321 from natural-law/master

fixed #1471: Update JS binding for plugin.