Make the graph undirected, i.e. for every edge from A to B, there
exists an edge from B to A. The provided function
Data.Graph.Inductive.Basic.undir duplicates loops as well, which
isn't wanted. It is assumed that no edges are already duplicates
[i.e. if there exists an edge (n1,n2), then there doesn't exist
(n2,n1)]. This function also preserves edge labels: if two edges
exist between two nodes with different edge labels, then both edges
will be duplicated.

Shuffle a list of elements.
This isn't the most efficient version, but should serve for small lists.
Adapted from:
http://www.cse.unsw.edu.au/~tsewell/shuffle.html
The adaptation mainly involved altering the code so that the new
random seed is also returned.