[NFC][TableGen] Remove small heap allocations in SearchableTableEmitter (#147845)
Change `GenericEnum` to not heap allocate its entries. Instead stash
them directly in the `Entries` vector. Change `EntryMap` to hold an
index as opposed to a pointer to the entry (the original reason why they
were unique_ptr).