Add basic support for subgraphs

This commit adds basic support for subgraphs. This includes the ability
to generate edges as a cartesian product of sugraphs and the ability to
set defaults that at each subgraph. This change does not support
clusters.