fix(kernel/module): non-termination

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(library/module): bug in module import

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(library/module): deadlock

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
test(lua): add import 'diamond' tst

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
test(lua): add import 'diamond' tst