shorten method load code with LINQ
make Scope class extensible
add Scope.HasVariable()
add subclasses of Scope for functions and loops

Correct default implementation of ResolveVariable() to travel up
through scopes. Override it in FunctionScope to retain behaviour.
use FunctionScope class for function definitions
add enum for var declarations
add stub for builtin variable override