[dev.link] cmd/link: cleanup of attribute handling code
Minor cleanup of symbol attributes. Specifically:
- if a symbol originally begins life as an object file symbol,
then is converted to external in cloneToExternal, use the
previously recorded object file index for the sym to figure
out if it has read-only data (in the case that there is no
entry for it in the map in question).
- remove SetAttrShared; only the loader should be populating this
attribute at symbol creation (it never gets updated later)