Store each node's edges in a global list

Move away from having a hash table with edges for each node to storing
what edges a node has in a global list, so that less memory is used.