Merge pull request #2720 from mono/fix-39325
[Profiler] Keep a reference to assemblies while coverage is running
In certain circumstances, for example when running under nunit-console, assemblies could be unloaded while the profiler still had a reference to them in order to generate the coverage data. In these cases, the memory referred to by the profiler would be invalid and would crash.
Fix this by incrementing the reference count of the assemblies preventing them from being unloaded while coverage is being collected.
Fixes BXC #39325