Imported functions and variables get the visibility from the prevailing module.
However, non-prevailing definitions do not get the visibility.
This patch adds visibility bits to GlobalValueSummary::GVFlags so that
non-prevailing definitions can get the most constraining visibility from the
prevailing definitions. Protected/hidden can imply dso_local which can enable
some optimizations (this is stronger than GVFlags::DSOLocal because the implied
dso_local can be leveraged for ELF -shared while default visibility dso_local
has to be cleared for ELF -shared).
Note: if a declaration has the most constraining visibility, the result
visibility may not be that one because we don't track visibility from
declarations.