JsBackend: save local and literal functions 'local' status in AST

Reason: to distinguish local functions,
when cleaning up after inline.

Unreferenced local functions can be removed.