Env.addGlobal() to add object as global

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
some code cleanup

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
[interface] expose environment to be embeddable

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