fixes for new versions of networkx

In newer versions of networkx the connected_components algorithms
implemented as generators rather than returing lists.  These changes
make pele play nice with both versions.

I noticed this because the travis tests started failing