Put functions on the context.

This simplifies function calls.
previously:

    f.someFunction(context, arg1, arg2);

now:

    context.someFunction(arg1, arg2)

Also, I've put the helper functions on the context as well, prefixed by
$: $getField, $setField, $mallocType, $destroyHandles.