refactor(kernel): implement substitution methods

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

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(kernel): add mk_rev_app, update_rev_app, implement instantiate_metavars functions, modify instantiate (free vars) API

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(kernel/justification): none is the unit of mk_composite

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(kernel): bugs in justification module, add missing metavar methods, add basic metavar tests

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