Custom deepcopy for Direct and Node

These objects have callable attributes, and callables are often not picklable.
Nested functions are not. The tests use numpy ufuncs, and apparently they
aren't either in numpy 1.6.2.  This commit provides deepcopy implementations
that workaround the situation by passing the functions across *without*
deepcopying them.