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.
Merge pull request #40 from js850/new_networkx

fixes for new versions of networkx