Compiler [Typechecker]: Fix optimizer breaking type check.
The optimizer converted code like:
object(Foo) foo = base_obj;
object(Foo) foo = base_obj + 1;
This caused the type checker to (erroneously) complain about
assigning 1 to foo if base_obj was typed as an object that
did not have an lfun::`+().
Now it is instead converted into:
object(Foo) foo = ([object(Foo)] base_obj) + 1;
Also removes the warning about no-op soft casts.