add function tests
fix visitor for root AST
fix that fn:data() was not defined (only fn:data(x))
fix function type signature for named references, do not wrap references to interpreted functions,
fix segfault on program-end/finalization when interpreted functions were defined in a native module but not used
when parsing a XQuery module without primary expression, do not put a nil as last term
fix that adhoc fix for nil in main modules without query body broke library modules. New behaviour: Do not allow main modules without query body
remove double slashes from urls before calling native libraries, because they break android's httpclient
better error message on invalid JSON
separate functions for xquery/xpath 1 and 3 parsing mode (also store parsing mode in static context), fix native function type signature parser to handle function types, fix error code for statically unknown function
fix data() crash if the context item was undefined
change dynamic function call to use dynamic context from the definition of the function (is that how it is supposed to be, or should the context be undefined??)
add basic higher order functions
change interpreted functions of native modules to have a static context, and use that one instead the current evaluation context. => problem: now they have a staticcontext without engine => add safety check for all functions accessing the engine of a static context
fix that functions were able to access the context item instead causing an error

(problem with comparing it to a "reference" implementation: I am copying their bugs, too)
fix memory leak when exception occurs during function call
another function value change: type signature terms can also be owned (auto freed), context item is accessible in implementation defined functions/references (those in native modules), but not in user defined functions; implemented fn:function-lookup
add fn:function-name and fn:function-arity
add partial function application, other changes
fix fold-right