Complexity, Heegaard diagrams and generalized Dunwoody manifolds