Use networkx.testing functions for network.readwrite tests.

Apply the same fix than #1085 to `networkx.readwrite`, for dealing with tests errors reported in #975. This only fixes the reported failures but we might need to search for more instances where we do not use `networkx.testing` for comparing nodes, edges and graphs.