implement UDA for module declaration
Merge pull request #3947 from IgorStepanov/module-attributes

[enh] implement UDA for module declaration
fix Issue 12931 - Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function
fix ddoc and header generation