refactor(kernel): cleanup instantiate and abstract procedures, implement update procedures

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(kernel): memory corruption bugs

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(kernel): add formatter and simplify contexts

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(kernel/instantiate): bug in new head_beta_reduce

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(tests/kernel): move tests to new kernel

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(kernel): style warnings

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(kernel): shallow copy procedure

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