Merge pull request #770 from abock/master

mdbrebase: fix prefix replacement, add regex & filename modes
For module handles, only check that rva's are within the image size.

This commit licensed as MIT/X11.
Fix inacurrate reference
Add actual source
Remove CodeProject licensed code
This regex was wrong in the first place, and second, it uses CC code from Stackoverflow
[sgen] Use gcc bitcount intrinsics where appropriate.
Fix some code issue warnings
Better check for instance equality of generic types. Fixes #15100
FixBuild
Ignore some asserts since the validation were removed
Merge pull request #771 from madewokherd/rvamap

For module handles, only check that rva's are within the image size.
in XLinq XObject there is no need to instantiate XObjectEventArgs every time.
Cache only resolved types not expression to report correct error location. Fixes #15035
Inline more is instance checks
reduce memory use on Attribute() caused by Attributes().
Fallback to $LANG if $LC_ALL isn't set.

Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=15214

This is a regression introduced in be532638.

Xamarin.Android assumes that the $LANG environment variable can be
used to control System.Globalization.CultureInfo.CurrentCulture,
setting LANG based on the current Java locale.

This was broken in be532638 because $LANG was no longer being checked
to determine the default locale, as $LC_ALL was not set.

Fix the fallback logic so that $LANG is checked when $LC_ALL is not.
Element() and Elements() could also reduce use of extraneous iterators.