Circular function expressions

Fixes #445 and #583.

Function expression bodies are now checked in a separate phase after all statements in the enclosing body to ensure constructs like the following are correctly typed:
```typescript
var foo = function () {
    var s = foo();
    return "hello";
}
```
Previously we'd perform a full type check of the body of the function expression whilst in the process determining the type of `foo` which would cause `foo` to be given type `any` because of the recursive reference. With this change, `foo` is now correctly typed as `() => string`.
We need a spec bug to make sure we update the verbiage about this limitation then.

6.3
Initializer expressions are evaluated in the scope of the function body but are not permitted to reference local variables and are only permitted to access parameters that are declared to the left of the parameter they initialize.