Sarah Ferguson, Duchess of York, has undergone a mastectomy after being diagnosed with breast cancer.