Demo improvements

In bpodgursky's demo helper, we now automatically generate node and edge
IDs unless they are explicitly defined. For nodes, we use the key used
to look up the node in the node map. For edges, we create a key of the
form "N|S->T", where N is an incrementing counter, S is the id of the
source node, and T is the id of the target node.

This change also switches demo-d3 to use bpodgursky's helper.