Support for scripted functions.

This megacommit adds support for user defined, scripted functions. They
are implemented as expressions which construct anonymous functions.
These anonymous functions can then be assigned to local variables and
attributes.