Recognize shared libraries when linking
Only collect shared libs on *nix
Proper conditial
Merge pull request #3397 from Yoplitein/master

Recognize shared libraries as valid files when linking
Fixup DDMD build due to ternary expression not implicitly converting to char*.
Merge pull request #3401 from AndrejMitrovic/Fixup3396

Fixup DDMD build due to ternary expression not implicitly converting to char*.
[style] fix indent
[Refactoring] Change return types from int to bool
[Refactoring] Remove side-effect in searchCtor
[Refactoring] Rename scope variable to `sc2` for aggregate members
[Refactoring] Use semanticRun for aggregates

Reasons:
1. Currently used states have problems:
  - `members` and `symtab` would be NULL for opaque declaration
  - `sizeok` is not set for InterfaceDeclaration
2. We should catch the "the first called semantic" timing for some reasons
[Refactoring] Consolidate forward reference handling between aggregates

- Find valid `scope` first
- Set parent before `type` semantic and its mangling calculation
- `parent` and `type` are necessary even for opaque declaration
[Refactoring] Consolidate handling of protection, storage_class, and userAttributes

They should be applied even for opaque declaration
[Refactorign] Consolidate `symtab`
Separate class hierarchy calculation from class member semantics