Fix #1021: IR-check assignment to val fields

Assignment to immutable val fields is only allowed in constructors.

Scalac handles immutable (val) fields that are mixed-in from a trait
adding a setter. The val is then initialized through this setter in
the trait initializer. This violates the IR contract that immutable
vals may only be assigned to in constructors.
Therefore, we always emit mixed-in fields as mutable in the IR.
Remove unnecessary vars in StringCharBuffer