[idl-generator] Add support for self-defined JS function

Developers can now write their own JS file for extension.
Merge pull request #21 from deqing/self-defined-js

[idl-generator] Add support for self-defined JS function