Structural Balance via Gradient Flows over Signed Graphs