feat(builtin/cast): use heq in the cast library

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
chore(tests/lean): adjust tests to reflect recent changes

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