refactor(library/cast): replace cast semantic attachment with axioms, add heterogeneous symmetry axiom

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