Enable pickling of anonymous functions

Note that captured environments of anonymous functions are not
pickled. In case an anonymous function with an environment
is unpickled, its environment remains uninitialized.

Integration with spores is intended to support in addition also
pickling of arbitrary complex environments.