fixed bugs in edge_iterator and elsewhere, added edge_iterator test - edit_distance example now completes run but does not give correct result