SI-7971 Handle static field initializers correctly

Before this fix, static fields where erroneously treated like instance
fields and the initialization was moved into the constructor.

With this fix, the static initializer statements go into the static
initializer of the class (called “<STATIC> def init” in Scala,
<clinit> in Java). The statements are added to an existing
static initializer method or, if no such method exists, a new static
initializer method is created and added to the class.
Merge pull request #3224 from soc/SI-7971

SI-7971 Handle static field initializers correctly