Separate AST-building and checking.

Before, almost all checking and SymbolTable building happened in the functions of ParseActions.cpp and to some extent in AST node class constructors. After this, the building and checking happens in a new CheckASTVisitor class, that is just a regular visitor.

This refactoring simplifies the ParseActions a lot, and makes it much easier to add new functionality.

Note that due to a suboptimal development history, this PR contains some commits that are adding use of generic C++14 lambdas. These changes have been disabled in later commits in this series, so this PR should be usable with the same compilers as before.