Refactor invocation to cope with inlining.

A given static frame may now have different actual frame memory needs
depending on if a spesh candidate has inlined other frames. Here, the
spesh logic is moved to the start of invocation, and frame allocation
is factored out and driven by what's needed. Can further optimize this
later on; for now, it's enough to hopefully lay the foundation for the
rest of basic inlining.