Fix Axiom::Function::Numeric::Binary#type to return proper object
Refactor Axiom::Attribute.infer_type to be simpler