fix(kernel/definition): clang compilation warning, and add module_idx typedef

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(kernel/type_checker): is_opaque predicate

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

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