[X86] Respect code_model when determining if a global is small/large (#74498)

Using the GlobalVariable code_model property added in #72077.

code_model = "small" means the global should be treated as small
regardless of the TargetMachine code model.
code_model = "large" means the global should be treated as large
regardless of the TargetMachine code model.

Inferring small/large based on a known section name still takes
precedence for correctness.

The intention is to use this for globals that are accessed very
infrequently but also take up a lot of space in the binary to mitigate
relocation overflows. Prime examples are globals that go in
"__llvm_prf_names" for coverage/PGO instrumented builds and
"asan_globals" for ASan builds.

GitOrigin-RevId: ddebce70210dcc97646578705dd13c6fb0e3ee0e
2 files changed