js-backend: refactoring, add support for callable references to native functions and members