An exact and scalable problem decomposition for security-constrained optimal power flow