Old C code for cellular refinement of graphs, based on http://arxiv.org/abs/1022.1921