fix #12 remove unused non-global function declarations (leave them in jsm2js and build, could be actually useful to quickly lookup the original definition to better understand while debugging).
fix #7 added more error messages and tests for closure-related issue while inlining