In preparation for inserting Thunks into InputSectionDescription::Sections extract the loop that finds InputSections that may have calls that need Thunks. This isn't much benefit now but this will be useful when we have to extract the InputSectionDescriptions::Sections from the Script commands.
This is patch 2 of 3 of converting createThunks() to insert into InputSectionDescriptions.