Fix Python 3 compatibility bug in pickler.py
Fix Python 3 compatibility bug in pickler.py

sys.modules changes during iteration. It seems that the intention was to
make a copy using sys.modules.values(), which returns a copy in Python
2, but a view in Python 3.

The issue comes up when using pytest, which implements lazy module
loading.

apache/beam,apache/beam,apache/beam,markflyhigh/incubator-beam,markflyhigh/incubator-beam,markflyhigh/incubator-beam,RyanSkraba/beam,lukecwik/incubator-beam,markflyhigh/incubator-beam,chamikaramj/beam,apache/beam,apache/beam,lukecwik/incubator-beam,robertwb/incubator-beam,apache/beam,apache/beam,lukecwik/incubator-beam,robertwb/incubator-beam,chamikaramj/beam,apache/beam,lukecwik/incubator-beam,lukecwik/incubator-beam,RyanSkraba/beam,chamikaramj/beam,iemejia/incubator-beam,markflyhigh/incubator-beam,robertwb/incubator-beam,RyanSkraba/beam,lukecwik/incubator-beam,markflyhigh/incubator-beam,apache/beam,chamikaramj/beam,lukecwik/incubator-beam,apache/beam,RyanSkraba/beam,chamikaramj/beam,markflyhigh/incubator-beam,robertwb/incubator-beam,iemejia/incubator-beam,chamikaramj/beam,robertwb/incubator-beam,lukecwik/incubator-beam,RyanSkraba/beam,lukecwik/incubator-beam,robertwb/incubator-beam,robertwb/incubator-beam,apache/beam,robertwb/incubator-beam,robertwb/incubator-beam,chamikaramj/beam,robertwb/incubator-beam,lukecwik/incubator-beam,RyanSkraba/beam,chamikaramj/beam,chamikaramj/beam,RyanSkraba/beam,chamikaramj/beam