DNN-6098: Refactoring and minor performance improvement in DotNetNuke.HttpModules.Analytics.AnalyticsModule

See https://dnntracker.atlassian.net/browse/DNN-6098.

Improvements are:
* Convert only once to lower case
* Check local file extensions before check upgrade/install request (IMHO upgrade/install requests are very rare and in most cases the return statement is reached by the local file extensions and not the upgrade/install check so this should be the first check).