Melt butter in large heavy skillet over medium-high heat. Add mushrooms and thyme; sauté 5 minutes. Add shallots; sauté 3 minutes or until tender. Add Madeira, and cook over medium-high heat 3 minutes or until liquid evaporates. Add whipping cream, and cook 2 to 5 minutes or until slightly thickened. Remove from heat.
Meanwhile,cook beans in a small amount of boiling water 5 minutes or just until crisp-tender; drain. Add beans to mushroom mixture, and toss gently. Spoon into a greased 2-quart gratin dish or shallow baking dish. Cover and keep warm.
Pour oil to depth of 2" into a 3-quart saucepan; heat to 350°. Fry leeks in 3 batches, 40 seconds or until golden. Remove leeks with small metal strainer; drain on paper towels. Immediately sprinkle with salt. Sprinkle fried leeks over warm bean mixture. Bake, uncovered, at 400° for 5 minutes or until casserole is thoroughly heated.