fix idl2jsx to output static constants and refactor stuff
fix idl2jsx to output static constants and refactor stuff

dj31416/JSX,jsx/JSX,mattn/JSX,jsx/JSX,dj31416/JSX,dj31416/JSX,dj31416/JSX,jsx/JSX,jsx/JSX,mattn/JSX,jsx/JSX,dj31416/JSX