make @interactive decorator friendlier with dill

sets the decorated function globals to main,
in addition to just the module name.

This helps dill treat it as if it were defined locally,
and the function actually behaves the same locally as it does on engines.
add to dill example notebook

because we can't write proper tests with dill, due to side effects.
still allow @interactive on Classes
Merge pull request #4710 from minrk/interactive-function

make @interactive decorator friendlier with dill