Fermi-surface instabilities and superconducting d-wave pairing.