[reg] fix Issue 13113 - cannot build druntime's gc.d with -debug=INVARIANT, ba...

...d @nogc inference?

Attributes can be inferred for generated functions just like for function literals. This is more accurate than having the parallel method of mergeFuncAttrs(), which was failing in this case because it wasn't taking invariants into account.

https://issues.dlang.org/show_bug.cgi?id=13113