Heegaard diagrams, graphs and 3-manifold spines