Improved type checker for FriCAS

by Krystian Bacławski for lmonade: scientific software distribution

Project aims at partial reimplementation of type checker in Spad compiler of FriCAS. Main goals include: better type inference, stricter type system, understandable diagnostic messages.