fix Issue 10947 - const out parameter is not properly rejected

Bitwise-and of Type::mod vs STCxxx is merely a mistake.

Additionally, `out inout` parameter should also be rejected.
[Refactoring] Report errors in semantic phase for invalid combination of parameter storage classes

Do it in parsing phase reduces the chance of error reporting.
fix Issue 10969 - Variadic template parameter re-use in function signature
Merge pull request #2526 from 9rnsr/fix10969

Issue 10969 - Variadic template parameter re-use in function signature
Merge pull request #2511 from 9rnsr/fix10947

Issue 10947 - const out parameter is not properly rejected
fix Issue 11137 - Stack overflow on invalid output path
fix Issue 11136 - ICE on incorrect module declaration
Merge pull request #2607 from WalterBright/fix11137

fix Issue 11137 - Stack overflow on invalid output path
Merge pull request #2606 from WalterBright/fix11136

fix Issue 11136 - ICE on incorrect module declaration