Implement deferred functions properly

Still some bugs, but I think it's mostly complete.
Fix for defer/invoke/stored-function interaction

createCall may use a Phi node in calling stored
functions (i.e. where the context is non-constant).
This was interacting badly with the change to emit
"invoke" instructions, since a new basic block
was being generated, being the predecessor to the
Phi block. The Phi block referred to the original
block (which is wrong).