fix Issue 10142 - enum value semantic problem that declared in class member
fix Issue 10144 - Using enum inside final class occurs weird errors

An enum and static variable declaration should not be affected by `synchronized`, `override`, `abstract`, and `final` attributes.
Also allow __gshared and synchronized/override/abstract/final combinations
fix Issue 10148 - unjustified 'safe function cannot call system function'
fix Issue 10160 - No line number "cannot modify struct ... with immutable members"
Merge pull request #2070 from 9rnsr/fix10144

[REG2.063a] Issue 10144 - Using enum inside final class occurs weird errors
Merge pull request #2072 from 9rnsr/fix10148

[REG2.063a] Issue 10148 - unjustified 'safe function cannot call system function'
merge D2 pull #2069
Merge pull request #2073 from 9rnsr/fix10160

[REG2.063a] Issue 10160 - No line number "cannot modify struct ... with immutable members"