Previously, we were ensuring that the "output index" for InputFunctions was unique across all symbols that referenced a function body, but allowing the same function body to have multiple table indexes.
Now, we use the same mechanism for table indexes as we already do for output indexes, ensuring that each InputFunction is only placed in the table once.
This makes the LLD output table denser and smaller, but with identical behaviour.
Note that we still need the Symbol::TableIndex member, to store the table index for function Symbols that don't have an InputFunction, ie for address-taken imports.
Split out from D41955. Please merge after D42096 and before D41955, otherwise you'll have to update the tests to merge in another order.