Inliner: introducing InlineStrategy
Create the `InlineStrategy` class to hold inline-relevant data that
spans multiple inlines. It tracks the number of inline candidates,
attempts, successes, last successful policy, and holds onto the root
context, and so on. The strategy is responsible for creating contexts
and reporting overall results for a method (either tree-based or
data-based).
The strategy also includes a simple jit time estimate. From various
observations, post-inline jit time can be modelled acceptably by simple
linear relationships on the input IL size. The strategy uses these models
to estimate the initial and current jit time. Estimate units are roughly
microseconds.
The strategy creates a time budget to flag cases where the estimated
jit time increase due to inlining is unreasonbly large. The budget
is initially based on the root method size, and may increase if there
are non-discretionary force inlines.
Once we have a bit more vetting of the budgeting mechanism, policies
will use it to limit inlining in a small number of runaway inlining cases
(see for example #2472).
Remove code under MEASURE_INLINING since the strategy plus the context
tree (optionally extended via policies) contains all that data and more.
Likewise, consolidate a number of the compiler's inlining-related member
variables into the strategy.