feat(library): add new coercion API

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(kernel): (de)serialization procedures don't need to be in the kernel

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(kernel): (de)serialization procedures don't need to be in the kernel