fix division by zero errors in Fruchterman-Reingold layout
Python: fix a crash in Graph.layout_fruchterman_reingold()