add py3compat.get_closure

for getting the closure attribute of a function
handle simple closures in pickleutil

It turns out this is pretty straightforward.
I'm sure there are plenty of cases where dill / cloud pickle are going to be desirable,
but Python 3 makes trivial closures a lot more likely,
and this handles those cases easily enough.
Merge pull request #5761 from minrk/pickle_simple_closures

handle simple closures in pickleutil