Added some skolem handling

Changed inferPatternTypes to return a list of the skolem variables allocated in
the process of pattern checking. Currently none of the cases produce skolems,
but when data constructors are finally implemented, they may.

Also wrote checkSkolemEscapes, which can be used in the lambda and case
branches. It uses the depth to check if a skolem has escaped into the
environment, and also checks for escaping skolem variables in the result type.