feat(kernel/environment): track which modules were already imported

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>