Replica symmetry breaking in the spin-glass model on lattices with finite connectivity: Application to graph partitioning.