Start using function-value environment pointers properly.

Functions are now called using the environment pointer in the
representation.

This means we can get rid of the instance variable in Function objects,
remove all instance-checking, and pass Yang functions arbitrarily to any
Yang script instance (implicitly closing over the global state of the
instance which created the function).