Fix type-inference bug that allowed ill-typed case-expressions

The following is an ill-typed program:
    data A = B | C;
    data X = Y | Z;

    f m = case m of {
        B -> 1;        -- Branch of type A -> Int
        Y -> 2;        -- Branch of type X -> Int
    };

    main = f C;

The type checker used to allow this even though the case expression plainly
contains branches with different types. Then the program would fail at runtime
with:
    $ ./bin/mini-core badcase.core
    No case for constructor C

This is because we type-checked each branch too independently. Now we propagate
the type of the scrutinee so we can catch this:
    $ ./bin/mini-core badcase.core
    Type Error:
        Cannot unify 'A' and 'X'
    in:
        f m = case m of {
            B -> 1;
            Y -> 2;
          }