InlineRefactoring: introducing InlinePolicy
Split the policy aspect of the InlineResult into a separate
policy object, acessed from the InlineResult via a base class.
Implement a LegacyPolicy to capture today's behavior.
Create a factory method for determining what policy to use. Right
now it always creates a LegacyPolicy. This is newed up for each
Inline decision, but since the InlineResult has relatively short
lifetime, we should probably recycle policy objects (might be
more desirable once they start having a bit more state).
Split out a bunch of the InlineDecision helper methods that lived
on InlineResult into global methods since policies will want to refer
to them too. Shame that enum classes don't allow member functions.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d5d25db5934520997ef085bd5f973451fd15a947