Made it work where Assembly.GetEntryAssembly() returns null (ASP.NET)

Also monitoring the AppDomain.DomainUnload event and shut down logging like for the process end. Since we're always in one AppDomain, the meaning of these events is similar.