fix Issue 12047 - UDAs are not checked

This is also a refactoring change for UDA semantic analysis.

1. Run UDAs in semantic2 phase.
Currently forward reference resolution mechanism is not perfect. UDAs often depends on other declarations in user code. Therefore analysing them in semantic1 phase would easily hit fwdref issues.
On the other hand, if UDAs are not checked for conditional compilation, essentially they have no effect for final execution code. So, I think moving their analysis timing from semantic1 to semantic2 is not a problem.

2. Each Dsymbols now have a pointer to the enclosing UserAttributeDeclaration.
We can use UserAttributeDeclaration::scope for forward reference resolution of UDAs. So we can elide Dsymbol::userAttributesScope.
Merge pull request #3183 from 9rnsr/fix12047

[REG2.065a] Issue 12047 - UDAs are not checked