Change structure of environment into separate variables and functions

This gives us more control over the environment and makes it easier to
work with it. Also each branch is now an orddict, easier to use and
more efficient.
Add function macro-function
Add functions with dynamic bindings

Useful for adding dynamically functions to environment. Clear all
variable bindings when they are called so they are not too bad.
Change function name apply_match_clauses to apply_match_lambda
Fix shell to allow defining functions and macros

This is the first version. When the environment is reset or in an
unslurp not only the functions and variables are reset but also all
the variables. This may not be the best.
Make funcall handle literal lambdas and match-lambdas