Scope for exception-safe scope handling

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jollamobile.com>
support for nodejs/narwhal-like module system

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jollamobile.com>