Move much from invoke into CallFrame constructor.

No functional changes here, just a refactor.