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.
Merge pull request #59 from peelonet/custom-functions

Support for scripted functions.