Make sure we add body-less functions to our program as well, and add the actual body later. We then need to compile functions again later once we have the definition with a body.
We do a bunch of work in ByteCodeEmitter::compileFunc() to prepare the values passed to Program::createFunction() even if we don't need them now, that's a possible optimization for a later commit.
hasBody() returns true if any body in the redeclaration chain already has a body, so I'm surprised to see this change -- I don't know if we reset willHaveBody() when we give the function a body, but the logic here seems wrong to me.