[llvm][object][GOFF] refine Global flag conditions (#211632)
Currently when iterating across the symbol table with the object library (in tools like nm/ar), some symbols that we wouldn't expect to be Global to the binder get flagged as SF_Global. With GOFF, we should exclude ESD entries who's type or binding scope make them unavailable for binder to use at Global scope.
The implementation currently only filters the Section binding scopes when setting the Global flag, so this change adds filters for SD/ED type records and Module scope as well (which restricts the def to only the current module).
We also add a test that checks ESD records for various types and binding strengths to see that we get the expected values.