In a large, heavy saucepan, heat 1/4 cup of the oil over medium-high heat. Add the onions and leeks and saute until the onions turn golden brown (about 15 minutes).
Add the Madeira to deglaze the pan, stirring to scrape up the browned bits from the bottom of the pan. Cook over medium-high heat to reduce the liquid by half.
In another saucepan, bring the chicken stock to a gentle simmer and maintain over low heat.
Add 1 cup of the simmering stock to the onion mixture and continue cooking over medium-high heat until the liquid has reduced and the mixture is quite thick (about 15 minutes longer). Set aside.
While the onions simmer, in another large heavy saucepan, heat the remaining 1/4 cup olive oil over medium heat. Add the rice and stir until each grain is well coated with oil and translucent with a white dot in the center (about 3 minutes).
Add the simmering stock a ladleful at a time, stirring frequently after each addition. Wait until the stock is almost completely absorbed (but the rice is never dry on top) before adding the next ladelful. Save 1/4 cup of stock to add at the end.
When the rice is tender to the bite but slightly firm in the center and looks creamy (about 20 minutes), stir in the chicken. Cook to heat through, about 1 minute.
Remove from the heat and stir in the butter, caramelized onion mixture, and reserved 1/4 cup of stock. Season to taste with salt and pepper and serve at once.