Emitter: Functionize code for call setup, use in call piping.
Emitter: Functionize code for call setup, use in call piping.

Call piping wasn't doing the 'check if it's unresolved, then decide
how to solve it' part that normal calls were doing. As a result, some
kinds of calls were failing to get the types solved right.

In particular, and_then could not be implemented using x |> f |> g
because the types were not getting solved right. However, I have not
added a test because and_then only works if you don't call it.

jesserayadkins/lily,FascinatedBox/lily,FascinatedBox/lily,jesserayadkins/lily,FascinatedBox/lily,jesserayadkins/lily,FascinatedBox/lily