[crossgen2] Fix memory leak in _corInfoImpls. (#49764)
* [crossgen2] Implement Dispose in Compilation.
_corInfoImpls elements keeps _compilation reference which keeps reference to whole table _corInfoImpls. The circular referene together with issue #12255 potentionally leads to memory leak in crossgen2 if that table is created more than once. Dispose() method clears the table and prevents memory leak.
Signed-off-by: Timur Mustafin <t.mustafin@partner.samsung.com>
* Update src/coreclr/tools/aot/crossgen2/Program.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>