Correctly compare topologies for equality

@kyleabeauchamp: will you check to see if those code solves any of your problems with join() and issue #18?